Getting rooms from a remote socket in cluster mode #5298
-
Hello, will this code work in cluster mode and will it return all the rooms that are socket in? const sockets = await this.io.in('105').fetchSockets();
sockets.forEach((socket) => console.log(socket.rooms)); |
Beta Was this translation helpful? Give feedback.
Answered by
darrachequesne
Feb 20, 2025
Replies: 1 comment
-
Yes 👍 Reference: https://socket.io/docs/v4/server-api/#namespacefetchsockets |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Bubuioc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes 👍
Reference: https://socket.io/docs/v4/server-api/#namespacefetchsockets