def on_disconnect(sid): """ 客户端断开连接的时候 :return: """ # 查询sid存在的房间 rooms = sio.rooms(sid) for room in rooms: # 将用户移除房间 sio.leave_room(sid, room)
def on_disconnect(sid): """ 当用户断开连接时被执行 :param sid: :return: """ # 将用户从专属vip包房剔除 rooms = sio.rooms(sid) for room in rooms: sio.leave_room(sid, room)
def on_disconnect(sid): """ 与客户端的连接断开之后执行的方法 :param sid: :return: """ # 将断开连接的客户端从他专属的房间中剔除 # 获取一个socketio 用户的所有房间 rooms = sio.rooms(sid) for room in rooms: sio.leave_room(sid, room)
def is_leave(sid): sio.leave_room(sid, room="100") pass
def disconnect_handler(sid): print('DisConnection request') sio.leave_room(sid, 'house') # 房间去除sid
def on_disconnect(sid): # 断开连接后, 退出所有的房间 for room in sio.rooms(): sio.leave_room(sid, room)
def on_disconnect(sid): rooms = sio.rooms(sid) for room in rooms: # 断开连接, 离开所有的房间 sio.leave_room(sid, room)