socket broadcast code example
Example: socket emit to specific room using nodejs socket.io
io.on('connection', socket => { socket.on('say to someone', (id, msg) => { socket.to(id).emit('my message', msg); });});
io.on('connection', socket => { socket.on('say to someone', (id, msg) => { socket.to(id).emit('my message', msg); });});