I want to sent data to one specific socket ID.
We used to be able to do this in the older versions:
io.sockets.socket(socketid).emit(\'message\', \'
@Mustafa Dokumacı and @Curious already provided enough information, I am adding how you can get socket id.
To get socket id use socket.id:
var chat = io.of("/socket").on('connection',onSocketConnected); function onSocketConnected(socket){ console.log("connected :"+socket.id); }