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

Method leave_room

src/socketio/server.py:288–300  ·  view source on GitHub ↗

Leave a room. This function removes the client from a room. :param sid: Session ID of the client. :param room: Room name. :param namespace: The Socket.IO namespace for the event. If this argument is omitted the default namespace is used.

(self, sid, room, namespace=None)

Source from the content-addressed store, hash-verified

286 self.manager.enter_room(sid, namespace, room)
287
288 def leave_room(self, sid, room, namespace=None):
289 """Leave a room.
290
291 This function removes the client from a room.
292
293 :param sid: Session ID of the client.
294 :param room: Room name.
295 :param namespace: The Socket.IO namespace for the event. If this
296 argument is omitted the default namespace is used.
297 """
298 namespace = namespace or '/'
299 self.logger.info('%s is leaving room %s [%s]', sid, room, namespace)
300 self.manager.leave_room(sid, namespace, room)
301
302 def close_room(self, room, namespace=None):
303 """Close a room.

Callers 14

test_leave_roomMethod · 0.95
admin_leave_roomMethod · 0.45
admin_leave_roomMethod · 0.45
test_leave_roomMethod · 0.45
test_leave_roomMethod · 0.45
leaveFunction · 0.45
leaveFunction · 0.45
leaveFunction · 0.45
leaveFunction · 0.45

Calls

no outgoing calls

Tested by 6

test_leave_roomMethod · 0.76
test_leave_roomMethod · 0.36
test_leave_roomMethod · 0.36