Way to retrieve current replica/node sockets inside specific room #4792
-
Hi, I have to retrieve all the sockets related to one specific node/replica (therefore BYPASSING the adapter) belonging to a specific room. I have seen that there is the method |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi! You can use the const sockets = await io.local.in("the-room").fetchSockets(); Reference: https://socket.io/docs/v4/server-api/#serverfetchsockets |
Beta Was this translation helpful? Give feedback.
Hi! You can use the
local
flag:Reference: https://socket.io/docs/v4/server-api/#serverfetchsockets