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\', \'
in Node.js --> socket.io --> there is a chat example to download Paste this in line (io on connection) part.. i use this code that works 100%
io.on('connection', function(socket){
socket.on('chat message', function(msg){
console.log(socket.id);
io.to(socket.id).emit('chat message', msg+' you ID is:'+socket.id);
});
});