Reputation:
I can't understand what is the difference between io.emit and io.sockets.emit.
Sometimes they behave same but at other times they behave different.
Upvotes: 1
Views: 1096
Reputation: 5225
socket.emit
sends the message to sender-client only
io.emit
sendings to all clients, include sender
I got it from here: io.emit vs socket.emit
Upvotes: 1