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

not recieving any events in node, why?

Open flyon opened this issue 8 years ago • 3 comments

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?

flyon avatar Oct 18 '16 19:10 flyon

bump, anyone please? We want to use this in a production setup asap because elephant.io isnt working properly.

flyon avatar Nov 01 '16 08:11 flyon

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

ashiina avatar Nov 02 '16 06:11 ashiina

Reference : https://github.com/rase-/socket.io-php-emitter/issues/20

ashiina avatar Nov 02 '16 06:11 ashiina