socket.io-php-emitter
socket.io-php-emitter copied to clipboard
not recieving any events in node, why?
Im trying to get this to work on my localhost.
on node:
//we create a separate pub and sub so that we can specify authentication
var ioPub = redis.createClient(settings.redisPort, settings.redisHost, {auth_pass: settings.redisPassword});
var ioSub = redis.createClient(settings.redisPort, settings.redisHost, {return_buffers: true, auth_pass: settings.redisPassword});
var adapter = redisio({pubClient: ioPub, subClient: ioSub});
this.io = require('socket.io')(server.getHttpServer(), {enablesXDR: true});
this.io.adapter(adapter)
settings are: localhost and port 6379, password = false in my local environment.
in PHP
$emitter = new \SocketIO\Emitter(); // If arguments are not provided, they will default to array('port' => '6379', 'host' => '127.0.0.1')
$emitter->emit($eventName,$data);
Im seeing action in the redis window, but I dont recieve any events in node. Any idea why?
bump, anyone please? We want to use this in a production setup asap because elephant.io isnt working properly.
What version of socket.io-redis
are you using?
This current socket.io-php-emitter
is not compatible after v0.2.0 of socket.io-redis
, and isn't maintained.
Try my fork : https://github.com/ashiina/socket.io-php-emitter
Reference : https://github.com/rase-/socket.io-php-emitter/issues/20