socket.io node socket.id broadcast code example
Example 1: socket emit to specific room using nodejs socket.io
io.on('connection', function(socket){ socket.to('some room').emit('some event');});
Example 2: socket emit to
io.to(socketid).emit('message', 'whatever');