Reputation: 732
I'm using socket 2.0 for a chat, and I would like to send messages from server side to a certain socket id I have stored in array. How can I do that, I don't see it clearly in socket.io docs.
Upvotes: 0
Views: 320
Reputation: 156
From : https://socket.io/docs/emit-cheatsheet/
// sending to individual socketid (private message)
socket.to(<socketid>).emit('hey', 'I just met you');
Upvotes: 1