Skip to content

Commit 9d170a7

Browse files
gabsoftwaredarrachequesne
authored andcommittedJul 1, 2017
[docs] Add io.emit in the cheat sheet (#2992)
1 parent 7199d1b commit 9d170a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎docs/emit.md

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ function onConnect(socket){
4242

4343
// sending to all clients on this node (when using multiple nodes)
4444
io.local.emit('hi', 'my lovely babies');
45+
46+
// sending to all connected clients
47+
io.emit('an event sent to all connected clients');
4548

4649
};
4750

0 commit comments

Comments
 (0)
Please sign in to comment.