Closed ericterpstra closed 10 years ago
Ok, my mistake. My app/emitters were running in a VM, and I accidentally started my main node process on my local machine. Need to pay closer attention to which terminal I'm typing my commands into. Everything is working as expected. Sorry :P
Please i need help I'm facing the same error its upto two days now but couldn't figure out what am missing here any clear examples?
I'm setting up an example app, and cannot figure out how to listen for events from socket.io-emitter (or socket.io-php-emitter). Everything seems to be working fine. I have two browsers that connect sucessfully to Socket.IO. The 'connection' event fires, and I can emit from Socket.IO back to the clients.
However, when I try to emit from socket.io-emitter (using the sample code in a separate process), or emit from PHP, I can see the publish events happening in Redis, but nothing happens on the connected clients. Is there anything special I need to do to pass events from socket.io-emitter to clients connected to Socket.IO?
My code is here:
// ===> socketapp.js <===
// ===> Client/Browser JavaScript <===
// ===> socket.io-php-emitter code <===
// * REDIS SUBSCRIBE output (for socket.io-php-emitter)*
// ===> socket.io-emitter test application code <===
// * REDIS SUBSCRIBE output (for socket.io-emitter) *
Hopefully this is clear. Everything I'm doing here is based of sample code from README files and the Socket.IO website. It just looks like everything is getting "stuck" in Redis.
Also, I tried putting a
console.log
in the socket.io-redis adapteronmessage
function, and it never happened. I'm not sure if this is a problem with socket.io-redis, or socket.io-emitter, or my code.Any assistance would be appreciated. Thanks.