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
Post a Comment