Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);  });});
Source by socket.io #
 
PREVIOUS NEXT
Tagged: #socket #emit #specific #room #nodejs
ADD COMMENT
Topic
Name
8+7 =