Saturday, 13 May 2017

Same Event name on Client side but different room

I created a room using socket.join('follower'+ variable); on server side and than emmited an event in this room as io.in('follower' + variable).emit('event', 'Hello World'); I want that only those sockets which are connected this room can see event and receive hello world.

Something like this on client side :
io.in('follower'+ variable).on('event' , function(data){ console.log(data) }

How can I achieve this functionality?
Thanks in advance



via Sarthak Patidar

No comments:

Post a Comment