io.to socket code example
Example 1: socket emit to
io.to(socketid).emit('message', 'whatever');
Example 2: socket emit to specific room using nodejs socket.io
io.to('room1').to('room2').to('room3').emit('some event');
io.to(socketid).emit('message', 'whatever');
io.to('room1').to('room2').to('room3').emit('some event');