Created
September 24, 2014 06:01
-
-
Save laser/4e29b1a478074034bac5 to your computer and use it in GitHub Desktop.
connections subscriber
This file contains hidden or 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
connections.onValue(function(socket) { | |
socket.broadcast.emit('message', 'A new user connected, with ID: ' + socket.id); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment