Replies: 2 comments 1 reply
-
Hi! Could you please explain your issue? |
Beta Was this translation helpful? Give feedback.
1 reply
-
If I understand correctly, you want to disconnect all the session of a particular user, is that right? In that case, you can use the io.on("connection", (socket) => {
socket.join(someUserId);
});
// and then upon disconnection
io.in(someUserId).disconnectSockets(); Reference: https://socket.io/docs/v4/server-api/#serverdisconnectsocketsclose |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
how to remove particular userid when user disconnected chat
Beta Was this translation helpful? Give feedback.
All reactions