storing and retrieving socket
- by Trevor Newhook
From what I can understand, once I create a socket, I can then create an array to store it with
userArray[socket.nickname]=socket;
I can then send a message to it with:
io.sockets.socket(userArray[data.to]).emit('private message', tstamp(), socket.nickname, message);
The basic logic is to store a copy of each socket in an object,…