MCPcopy Create free account
hub / github.com/miguelgrinberg/python-socketio / get_rooms

Method get_rooms

src/socketio/base_manager.py:140–149  ·  view source on GitHub ↗

Return the rooms a client is in.

(self, sid, namespace)

Source from the content-addressed store, hash-verified

138 pass
139
140 def get_rooms(self, sid, namespace):
141 """Return the rooms a client is in."""
142 r = []
143 try:
144 for room_name, room in self.rooms[namespace].items():
145 if room_name is not None and sid in room:
146 r.append(room_name)
147 except KeyError:
148 pass
149 return r
150
151 def _generate_ack_id(self, sid, callback):
152 """Generate a unique identifier for an ACK packet."""

Callers 7

serialize_socketMethod · 0.80
roomsMethod · 0.80
serialize_socketMethod · 0.80
test_no_roomMethod · 0.80
test_roomsMethod · 0.80
test_no_roomMethod · 0.80
test_roomsMethod · 0.80

Calls

no outgoing calls

Tested by 4

test_no_roomMethod · 0.64
test_roomsMethod · 0.64
test_no_roomMethod · 0.64
test_roomsMethod · 0.64