-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only broadcasts? No function to send to a particular socket. #20
Comments
You can do io.to(id).emit('event', data) |
that would be fantastic! Thanks for helping I will try it out. Sent from my iPhone
|
I think it worked. thanks! @rase- |
Awesome. Closing as it seems solved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
normally within 1 node instance you could:
emit message from sockets[A] --->node instance -->sockets[B]
emit message from sockets[B] --->node instance -->sockets[A]
now, when i have 10 node instances, client A and client B on different instances, how do I send a message from A to B? Redis seem to only do broadcast.
PS: it seems if you do this on RedisStore it works:
socket.broadcast.emit('msg', data);
but how do I do
sockets[B].emit('msg', data);
The text was updated successfully, but these errors were encountered: