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

Method rooms

src/socketio/base_server.py:183–191  ·  view source on GitHub ↗

Return the rooms a client is in. :param sid: Session ID of the client. :param namespace: The Socket.IO namespace for the event. If this argument is omitted the default namespace is used.

(self, sid, namespace=None)

Source from the content-addressed store, hash-verified

181 namespace_handler
182
183 def rooms(self, sid, namespace=None):
184 """Return the rooms a client is in.
185
186 :param sid: Session ID of the client.
187 :param namespace: The Socket.IO namespace for the event. If this
188 argument is omitted the default namespace is used.
189 """
190 namespace = namespace or '/'
191 return self.manager.get_rooms(sid, namespace)
192
193 def transport(self, sid, namespace=None):
194 """Return the name of the transport used by the client.

Callers 6

test_roomsMethod · 0.45
test_roomsMethod · 0.45
test_roomsMethod · 0.45
test_roomsMethod · 0.45

Calls 1

get_roomsMethod · 0.80

Tested by 6

test_roomsMethod · 0.36
test_roomsMethod · 0.36
test_roomsMethod · 0.36
test_roomsMethod · 0.36