-
Notifications
You must be signed in to change notification settings - Fork 10.1k
Closed
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Feature request:
I would like to request a feature to disconnect all sockets of a given room.
Use case:
A logged-in user has multiple connections to the server (and are also connected to different node processes). Upon user logout or session expiry, I would like to disconnect all the client connections of that user session. So, I have created a unique room for each user session id and joined all the connections to that room. So I can simply disconnect all the clients connected to that room (i.e to that session).
Expecting something like this:
io.in('room-name').disconnect(true)This is missing as of now in the lib. Also, it should send signals over the adaptor to other processes to disconnect from all the other processes too.
Any suggestions? If it's a good approach, I can create a PR for it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request