How can i emit to arrays of connected socket-ids ? #3665
Unanswered
parseshyam
asked this question in
Q&A
Replies: 1 comment
-
There is no built-in way to do that right now. You should be able to use ids.forEach(id => io.to(id));
io.emit("hello"); The question has already been asked on the Slack channel, so it may make sense to add |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have connected socket-id stored in DB's, and i want to emit to multiple socket-id's based on some criteria or conditions
instead of looping over and sending is there any other way to send array of socket-id's or something ?
Like ....emit ( [......socket-id's array.........] ,"data" )
Beta Was this translation helpful? Give feedback.
All reactions