Tuesday 30 May 2017

Socketio Broadcast to selected socket.id instead of using rooms and namespaces socket.io

I'm trying to implement a small chat application where a user can able to send message to specific Id or set of Id's. I went through the socketio documentation and could find a proper solution. i tried this function

socket.broadcast.to(socketid).emit('message', 'for your eyes only');

but it didnt work.



via TRomesh

No comments:

Post a Comment