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

Method disconnect

src/socketio/async_client.py:322–332  ·  view source on GitHub ↗

Disconnect from the server. Note: this method is a coroutine.

(self)

Source from the content-addressed store, hash-verified

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.

Callers 5

connectMethod · 0.95
shutdownMethod · 0.95
test_disconnectMethod · 0.95
_handle_disconnectMethod · 0.45

Calls 1

_send_packetMethod · 0.95

Tested by 2

test_disconnectMethod · 0.76