how to send an event to one socket in socket.io
// sends the event to the socket that has the specified id.
io.to(socketId).emit("event", data);
Are there any code examples left?
New code examples in category Javascript
// sends the event to the socket that has the specified id.
io.to(socketId).emit("event", data);