mirror of
https://github.com/EvolutionAPI/evolution-client-python.git
synced 2025-12-18 19:32:20 -06:00
feat: WebSocket service for event and connection management
This commit is contained in:
33
env/lib/python3.10/site-packages/socketio/base_namespace.py
vendored
Normal file
33
env/lib/python3.10/site-packages/socketio/base_namespace.py
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
class BaseNamespace:
|
||||
def __init__(self, namespace=None):
|
||||
self.namespace = namespace or '/'
|
||||
|
||||
def is_asyncio_based(self):
|
||||
return False
|
||||
|
||||
|
||||
class BaseServerNamespace(BaseNamespace):
|
||||
def __init__(self, namespace=None):
|
||||
super().__init__(namespace=namespace)
|
||||
self.server = None
|
||||
|
||||
def _set_server(self, server):
|
||||
self.server = server
|
||||
|
||||
def rooms(self, sid, namespace=None):
|
||||
"""Return the rooms a client is in.
|
||||
|
||||
The only difference with the :func:`socketio.Server.rooms` method is
|
||||
that when the ``namespace`` argument is not given the namespace
|
||||
associated with the class is used.
|
||||
"""
|
||||
return self.server.rooms(sid, namespace=namespace or self.namespace)
|
||||
|
||||
|
||||
class BaseClientNamespace(BaseNamespace):
|
||||
def __init__(self, namespace=None):
|
||||
super().__init__(namespace=namespace)
|
||||
self.client = None
|
||||
|
||||
def _set_client(self, client):
|
||||
self.client = client
|
||||
Reference in New Issue
Block a user