3

I am using django-channels>=2.0.0 and I want to find how many users in "room1". I don't know how to find total connections.

John
  • 45
  • 1
  • 7

1 Answers1

0

Using the InMemoryChannelLayer, inside your consumer, you can check how many connections have been added to your channel layer with :

len(self.channel_layer.groups.get('room1', {}).items())
drec4s
  • 7,946
  • 8
  • 33
  • 54