You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have a problem with counting all clients connected to a specific room. We are using Redis adapter and we seem to be getting different results on both of our ECS tasks. I can call io.of("/").adapter.rooms.get(hash) but it seems to count clients in this room within one of the tasks. How can I get a number of clients connected to a room across all instances?
I've checked socket.io and socket.io redis adapter reference twice and I haven't found a proper solution. Sorry if this is dumb question, but nothing seems to work and this seems to me like an obvious "should be there" feature that probably is already implemented but I can't seem to find it.
The text was updated successfully, but these errors were encountered:
This is not the most efficient way, because it returns some additional attributes (id, handshake, rooms, data) for each socket, but this also allows to count the number of distinct users:
Hi,
I have a problem with counting all clients connected to a specific room. We are using Redis adapter and we seem to be getting different results on both of our ECS tasks. I can call
io.of("/").adapter.rooms.get(hash)
but it seems to count clients in this room within one of the tasks. How can I get a number of clients connected to a room across all instances?I've checked socket.io and socket.io redis adapter reference twice and I haven't found a proper solution. Sorry if this is dumb question, but nothing seems to work and this seems to me like an obvious "should be there" feature that probably is already implemented but I can't seem to find it.
The text was updated successfully, but these errors were encountered: