Skip to content

Emit help #4924

Closed Answered by darrachequesne
itsfuad asked this question in General
Discussion options

You must be logged in to vote

Hi!

Method Description
io.emit() to all connected clients
socket.broadcast.emit() to all connected clients, except the sender
io.to("room1").emit() to all connected clients in the room named "room1"
socket.to("room1").emit() to all connected clients in the room named "room1", except the sender

Basically, rooms are filters that you apply when broadcasting an event.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by itsfuad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
2 participants