How to broadcast but exclulde specific Sids? #323
Answered
by
Totodore
hlf20010508
asked this question in
Q&A
-
I checked the code of |
Beta Was this translation helpful? Give feedback.
Answered by
Totodore
May 23, 2024
Replies: 1 comment
-
Rooms are only a server thing. You can just join your socket to its corresponding room sid at connection ( Later you can do: socket.broadcast().except(sid1, sid2); Also not that the broadcast operator exclude the sender by default. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hlf20010508
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rooms are only a server thing. You can just join your socket to its corresponding room sid at connection (
socket.join(socket.sid);
).Later you can do:
Also not that the broadcast operator exclude the sender by default.