why socket send message from server to client code example
Example: How to send a message to a particular client with socket.io
io.sockets.in('[email protected]').emit('new_msg', {msg: 'hello'});
io.sockets.in('[email protected]').emit('new_msg', {msg: 'hello'});