diff --git a/docs/emit.md b/docs/emit.md index c022618423..96ff26f7e4 100644 --- a/docs/emit.md +++ b/docs/emit.md @@ -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'); };