socket.io-php-emitter
socket.io-php-emitter copied to clipboard
read error on connection
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'));