Skip to content

Commit

Permalink
[docs] Add io.emit in the cheat sheet (socketio#2992)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabsoftware authored and darrachequesne committed Jul 1, 2017
1 parent e217952 commit 0901ac2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/emit.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function onConnect(socket){

// sending to all clients on this node (when using multiple nodes)
io.local.emit('hi', 'my lovely babies');

// sending to all connected clients
io.emit('an event sent to all connected clients');

};

Expand Down

0 comments on commit 0901ac2

Please sign in to comment.