socket.io-php-emitter icon indicating copy to clipboard operation
socket.io-php-emitter copied to clipboard

read error on connection

Open rkang30 opened this issue 6 years ago • 0 comments

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'));

rkang30 avatar Aug 27 '19 19:08 rkang30