Socket.IO: how can i get a socketid when i emit a specific client in socket.io 1.0
I want to communicate an action to a specific client using socket.io 1.0.
After reading Sending a message to a specific ID in Socket.IO 1.0 , I know I can Application:
io.sockets.connected[socketid].emit()
to convey the action to a specific person.
But how can I get it socketid
?
I wrote like this: socket.id=nickName
but it doesn't work.
+1
source to share