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

Method disconnect

src/socketio/client.py:306–313  ·  view source on GitHub ↗

Disconnect from the server.

(self)

Source from the content-addressed store, hash-verified

304 else None
305
306 def disconnect(self):
307 """Disconnect from the server."""
308 # here we just request the disconnection
309 # later in _handle_eio_disconnect we invoke the disconnect handler
310 for n in self.namespaces:
311 self._send_packet(self.packet_class(
312 packet.DISCONNECT, namespace=n))
313 self.eio.disconnect()
314
315 def shutdown(self):
316 """Stop the client.

Callers 13

connectMethod · 0.95
shutdownMethod · 0.95
test_disconnectMethod · 0.95
_handle_disconnectMethod · 0.45
admin_disconnectMethod · 0.45
admin_disconnectMethod · 0.45
disconnect_requestFunction · 0.45
disconnect_requestFunction · 0.45
disconnect_requestFunction · 0.45
disconnect_requestFunction · 0.45
disconnect_requestFunction · 0.45

Calls 1

_send_packetMethod · 0.95

Tested by 2

test_disconnectMethod · 0.76