Skip to content

Instantly share code, notes, and snippets.

Pierpaolo PierpaoloLucarelli

Block or report user

Report or block PierpaoloLucarelli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alexpchin
alexpchin / socket-cheatsheet.js
Created Dec 15, 2015
A quick cheatsheet for socket.io
View socket-cheatsheet.js
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender
You can’t perform that action at this time.