node.js - socket.io-redis not forwarding messages to sockets on a namespace -


i have solution application emitting messages using socket.io-emitter , socket server handling messages.

the socket server receives messages client browser without issue not pickup messages other application sent on redis adapter.

i've debugged redis adapter , can see messages being received , can see associated correct namespace. appear not firing socket.on() event

the server code has more going on boils down following

io.adapter(redisio({host: redishost, port: redisport}));      io.of('/mynamespace').on('connection',     function(socket) {        // message never gets fired        socket.on('other-server-message',dosomething);        // message works fine        socket.on('message-from-browser-client',dosomethingelse);     } ); 

there isn't documentation around great

i realised issue was. misunderstanding socket.io-emitter doing.

i sending message emitter , trying capture on server , push out clients. emitter broadcasting directly clients in web browser if server socket (which wanted).

soon updated client code check message worked perfectly


Comments

Popular posts from this blog

Redirect to a HTTPS version using .htaccess -

Unlimited choices in BASH case statement -

javascript - jQuery: Add class depending on URL in the best way -