Skip to content

How to broadcast but exclulde specific Sids? #323

Answered by Totodore
hlf20010508 asked this question in Q&A
Discussion options

You must be logged in to vote

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:

socket.broadcast().except(sid1, sid2);

Also not that the broadcast operator exclude the sender by default.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hlf20010508
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants