Browse Source

Document how to get connection state in the client (Fixes #799)

pull/844/head
Miguel Grinberg 3 years ago
parent
commit
47c5f45c76
  1. 4
      docs/api.rst
  2. 4
      src/socketio/client.py

4
docs/api.rst

@ -35,7 +35,7 @@ API Reference
``ConnectionRefusedError`` class
--------------------------------
.. autoclass:: ConnectionRefusedError
.. autoclass:: socketio.exceptions.ConnectionRefusedError
:members:
``WSGIApp`` class
@ -128,7 +128,7 @@ API Reference
:members:
``AsyncAioPikaManager`` class
---------------------------
-----------------------------
.. autoclass:: AsyncAioPikaManager
:members:

4
src/socketio/client.py

@ -148,8 +148,8 @@ class Client(object):
self.socketio_path = None
self.sid = None
self.connected = False
self.namespaces = {}
self.connected = False #: Indicates if the client is connected or not.
self.namespaces = {} #: set of connected namespaces.
self.handlers = {}
self.namespace_handlers = {}
self.callbacks = {}

Loading…
Cancel
Save