Disconnect from the server. Note: this method is a coroutine.
(self)
| 320 | else None |
| 321 | |
| 322 | async def disconnect(self): |
| 323 | """Disconnect from the server. |
| 324 | |
| 325 | Note: this method is a coroutine. |
| 326 | """ |
| 327 | # here we just request the disconnection |
| 328 | # later in _handle_eio_disconnect we invoke the disconnect handler |
| 329 | for n in self.namespaces: |
| 330 | await self._send_packet(self.packet_class(packet.DISCONNECT, |
| 331 | namespace=n)) |
| 332 | await self.eio.disconnect() |
| 333 | |
| 334 | async def shutdown(self): |
| 335 | """Stop the client. |