Created
November 16, 2012 06:29
-
-
Save clonn/4084802 to your computer and use it in GitHub Desktop.
socket.io send message to specific client, and remove item from array.
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
// remove a room key | |
client.on('disconnect', function (data) { | |
var key = room.indexOf(client.id);; | |
room.splice(key, 1); | |
io.sockets.socket(adminId).emit('query-room-list', room); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment