-
Notifications
You must be signed in to change notification settings - Fork 10.1k
How to get number of clients in a room #1661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I ran into the same problem a about a week ago. I found this answer on SO to be helpful in finding:
which returns an array of connected clients. you can also just create your own array and push to it in the callback of |
So to answer your question: io.sockets.sockets.length |
It would be good to be able to get the IDs of every socket in a room. Is there any way to do that? |
@download13, that's another question, see #1428 for example. |
That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible). |
in 0.7.x, I can clients() function to retrieve the number of clients in a room. But how can I do it in version 1.0.x ?
The text was updated successfully, but these errors were encountered: