Skip to content

Instantly share code, notes, and snippets.

@ghiden
Created June 22, 2011 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ghiden/1039525 to your computer and use it in GitHub Desktop.
Save ghiden/1039525 to your computer and use it in GitHub Desktop.
sending a message to specific clients with socket.io
/* just a snippet */
var client_ids = [a, b, c];
for (var cid in client_ids) {
socket.clients[client_ids[cid]].send('hello');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment