Skip to content

query the state of a connection #799

@kristjanvalur

Description

@kristjanvalur

Is your feature request related to a problem? Please describe.
Client logic that works with connects and reconnects may knot always know what the state of the connection is.
It is convenient to be able to check if a namespace is connected or disconnected. The javascript version of the library has a connected property on the connection.

Describe the solution you'd like
a function querying the status of a connection would be useful. Namespaces shoudld be supported.
so:

def get_state(self.namespace=""):
   # return "connected", "disconnected", "reconnecting" based on internal logic.

Such a method should also exist on the namespace class.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions