socket.broadcast.to(room) code example Example: socket io broadcast to room socket.to(room).broadcast.emit('hi')