Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read error on connection #33

Open
rkang30 opened this issue Aug 27, 2019 · 0 comments
Open

read error on connection #33

rkang30 opened this issue Aug 27, 2019 · 0 comments

Comments

@rkang30
Copy link

rkang30 commented Aug 27, 2019

Hi,

I get error "read error on connection" when I emit data. The connection seems to be ok though. When I create an emitter object, I get a connected object (please see below)

$redis = new \Redis();
$redis->connect($_SERVER['SERVER_ADDR'], '8090');
$emitter = new \SocketIO\Emitter($redis);
dd($emitter);

Emitter {#514 ▼
+"redis": Redis {#519 ▼
isConnected: true
host: "172.16.6.66"
port: 8090
auth: null
dbNum: 0
timeout: 0.0
persistentId: null
options: {▼
READ_TIMEOUT: 0.0
SERIALIZER: NONE
PREFIX: null
SCAN: NORETRY
}
}
+"key": "socket.io#emitter"
+"_rooms": []
+"_flags": []
}

However, whenever I try to emit data, I get errors.

$emitter->broadcast->emit('event', array('name' => 'foo'));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant