Created
May 17, 2012 03:01
-
-
Save tchajed/2715894 to your computer and use it in GitHub Desktop.
handling sessions in socket.io
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
// from https://github.com/LearnBoost/Socket.IO/wiki/Migrating-0.6-to-0.7+ | |
// saving the socket id | |
var sid = socket.id | |
// sending a message to a particular socket | |
io.socket(sid).emit("my event", [args]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment