diff --git a/docs/emit.md b/docs/emit.md index 86996680f2..1ff0195fe2 100644 --- a/docs/emit.md +++ b/docs/emit.md @@ -29,7 +29,7 @@ function onConnect(socket){ io.of('myNamespace').to('room').emit('event', 'message'); // sending to individual socketid (private message) - socket.to().emit('hey', 'I just met you'); + io.to().emit('hey', 'I just met you'); // sending with acknowledgement socket.emit('question', 'do you think so?', function (answer) {});