websocket - How to leave all rooms that the socket is connected to at one go in Node.js -


i have code socket made join multiple rooms. @ point in code, want leave rooms @ 1 go, without disconnecting socket. possible this? if yes, how can this? in advance..

that's possible. can leave rooms without disconnecting socket. socket disconnects when make call socket.disconnect().

to you'll have maintain list of rooms each client joins , leaves. leave rooms iterate through list , make call socket.leave(roomname);


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -