Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3386e15 commit e26b71cCopy full SHA for e26b71c
docs/API.md
@@ -661,7 +661,7 @@ io.on('connection', (socket) => {
661
socket.join('room 237', () => {
662
let rooms = Object.keys(socket.rooms);
663
console.log(rooms); // [ <socket.id>, 'room 237' ]
664
- io.to('room 237', 'a new user has joined the room'); // broadcast to everyone in the room
+ io.to('room 237').emit('a new user has joined the room'); // broadcast to everyone in the room
665
});
666
667
```
0 commit comments