Enter a room. This function adds the client to a room. The :func:`emit` and :func:`send` functions can optionally broadcast events to all the clients in a room. :param sid: Session ID of the client. :param room: Room name. If the room does not exist it is cr
(self, sid, room, namespace=None)
| 270 | else None |
| 271 | |
| 272 | def enter_room(self, sid, room, namespace=None): |
| 273 | """Enter a room. |
| 274 | |
| 275 | This function adds the client to a room. The :func:`emit` and |
| 276 | :func:`send` functions can optionally broadcast events to all the |
| 277 | clients in a room. |
| 278 | |
| 279 | :param sid: Session ID of the client. |
| 280 | :param room: Room name. If the room does not exist it is created. |
| 281 | :param namespace: The Socket.IO namespace for the event. If this |
| 282 | argument is omitted the default namespace is used. |
| 283 | """ |
| 284 | namespace = namespace or '/' |
| 285 | self.logger.info('%s is entering room %s [%s]', sid, room, namespace) |
| 286 | self.manager.enter_room(sid, namespace, room) |
| 287 | |
| 288 | def leave_room(self, sid, room, namespace=None): |
| 289 | """Leave a room. |
no outgoing calls