Created
August 19, 2011 08:46
-
-
Save rogerdudler/1156357 to your computer and use it in GitHub Desktop.
Socket.io notification types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Send the message to all clients except the sender | |
socket.broadcast.emit('event', data); | |
// Same but not guaranteed | |
socket.volatile.emit('event', data); | |
// Send the message to all clients including the sender | |
io.sockets.emit('event', data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment