how to send an event to one socket in socket io

Solutions on MaxInterview for how to send an event to one socket in socket io by the best coders in the world

showing results for - "how to send an event to one socket in socket io"
Marie
06 Jun 2018
1// sends the event to the socket that has the specified id.
2io.to(socketId).emit("event", data);
3