� ���g����ddlZddlZddlmZddlmZddlmZejd��ZGd�dej��Z dS) �N�)� base_server)� exceptions)�packetzsocketio.serverc���eZdZdZ d$d�Z d%d�Z d&d�Zd'd�Zd'd �Zd'd �Z d'd �Z d'd �Z d'd �Z d(d�Z d�Zd�Zd�Zd)d�Z d*d�Zd�Zd�Zd�Zd'd�Zd�Zd�Zd�Zd�Zd �Zd!�Zd"�Zd#�ZdS)+�ServeraaA Socket.IO server. This class implements a fully compliant Socket.IO web server with support for websocket and long-polling transports. :param client_manager: The client manager instance that will manage the client list. When this is omitted, the client list is stored in an in-memory structure, so the use of multiple connected servers is not possible. :param logger: To enable logging set to ``True`` or pass a logger object to use. To disable logging set to ``False``. The default is ``False``. Note that fatal errors are logged even when ``logger`` is ``False``. :param serializer: The serialization method to use when transmitting packets. Valid values are ``'default'``, ``'pickle'``, ``'msgpack'`` and ``'cbor'``. Alternatively, a subclass of the :class:`Packet` class with custom implementations of the ``encode()`` and ``decode()`` methods can be provided. Client and server must use compatible serializers. :param json: An alternative json module to use for encoding and decoding packets. Custom json modules must have ``dumps`` and ``loads`` functions that are compatible with the standard library versions. :param async_handlers: If set to ``True``, event handlers for a client are executed in separate threads. To run handlers for a client synchronously, set to ``False``. The default is ``True``. :param always_connect: When set to ``False``, new connections are provisory until the connect handler returns something other than ``False``, at which point they are accepted. When set to ``True``, connections are immediately accepted, and then if the connect handler returns ``False`` a disconnect is issued. Set to ``True`` if you need to emit events from the connect handler and your client is confused when it receives events before the connection acceptance. In any other case use the default of ``False``. :param namespaces: a list of namespaces that are accepted, in addition to any namespaces for which handlers have been defined. The default is `['/']`, which always accepts connections to the default namespace. Set to `'*'` to accept all namespaces. :param kwargs: Connection parameters for the underlying Engine.IO server. The Engine.IO configuration supports the following settings: :param async_mode: The asynchronous model to use. See the Deployment section in the documentation for a description of the available options. Valid async modes are ``'threading'``, ``'eventlet'``, ``'gevent'`` and ``'gevent_uwsgi'``. If this argument is not given, ``'eventlet'`` is tried first, then ``'gevent_uwsgi'``, then ``'gevent'``, and finally ``'threading'``. The first async mode that has all its dependencies installed is then one that is chosen. :param ping_interval: The interval in seconds at which the server pings the client. The default is 25 seconds. For advanced control, a two element tuple can be given, where the first number is the ping interval and the second is a grace period added by the server. :param ping_timeout: The time in seconds that the client waits for the server to respond before disconnecting. The default is 20 seconds. :param max_http_buffer_size: The maximum size that is accepted for incoming messages. The default is 1,000,000 bytes. In spite of its name, the value set in this argument is enforced for HTTP long-polling and WebSocket connections. :param allow_upgrades: Whether to allow transport upgrades or not. The default is ``True``. :param http_compression: Whether to compress packages when using the polling transport. The default is ``True``. :param compression_threshold: Only compress messages when their byte size is greater than this value. The default is 1024 bytes. :param cookie: If set to a string, it is the name of the HTTP cookie the server sends back to the client containing the client session id. If set to a dictionary, the ``'name'`` key contains the cookie name and other keys define cookie attributes, where the value of each attribute can be a string, a callable with no arguments, or a boolean. If set to ``None`` (the default), a cookie is not sent to the client. :param cors_allowed_origins: Origin or list of origins that are allowed to connect to this server. Only the same origin is allowed by default. Set this argument to ``'*'`` to allow all origins, or to ``[]`` to disable CORS handling. :param cors_credentials: Whether credentials (cookies, authentication) are allowed in requests to this server. The default is ``True``. :param monitor_clients: If set to ``True``, a background task will ensure inactive clients are closed. Set to ``False`` to disable the monitoring task (not recommended). The default is ``True``. :param transports: The list of allowed transports. Valid transports are ``'polling'`` and ``'websocket'``. Defaults to ``['polling', 'websocket']``. :param engineio_logger: To enable Engine.IO logging set to ``True`` or pass a logger object to use. To disable logging set to ``False``. The default is ``False``. Note that fatal errors are logged even when ``engineio_logger`` is ``False``. NFc ��|pd}|p|}|j�d||pd|��|j�|||||||���dS)a� Emit a custom event to one or more connected clients. :param event: The event name. It can be any string. The event names ``'connect'``, ``'message'`` and ``'disconnect'`` are reserved and should not be used. :param data: The data to send to the client or clients. Data can be of type ``str``, ``bytes``, ``list`` or ``dict``. To send multiple arguments, use a tuple where each element is of one of the types indicated above. :param to: The recipient of the message. This can be set to the session ID of a client to address only that client, to any custom room created by the application to address all the clients in that room, or to a list of custom room names. If this argument is omitted the event is broadcasted to all connected clients. :param room: Alias for the ``to`` parameter. :param skip_sid: The session ID of a client to skip when broadcasting to a room or to all clients. This can be used to prevent a message from being sent to the sender. To skip multiple sids, pass a list. :param namespace: The Socket.IO namespace for the event. If this argument is omitted the event is emitted to the default namespace. :param callback: If given, this function will be called to acknowledge the client has received the message. The arguments that will be passed to the function are those provided by the client. Callback functions can only be used when addressing an individual client. :param ignore_queue: Only used when a message queue is configured. If set to ``True``, the event is emitted to the clients directly, without going through the queue. This is more efficient, but only works when a single server process is used. It is recommended to always leave this parameter with its default value of ``False``. Note: this method is not thread safe. If multiple threads are emitting at the same time to the same client, then messages composed of multiple packets may end up being sent in an incorrect sequence. Use standard concurrency solutions (such as a Lock object) to prevent this situation. �/zemitting event "%s" to %s [%s]�all)�room�skip_sid�callback� ignore_queueN)�logger�info�manager�emit) �self�event�data�tor r � namespacerrs �_/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/socketio/server.pyrz Server.emitvsy��X�$�� ��z�T�� � ���9�5���� � 3� 3� 3� � ���%��y�t�#+�h�'3� � 5� 5� 5� 5� 5�c �@�|�d|||||||���dS)a Send a message to one or more connected clients. This function emits an event with the name ``'message'``. Use :func:`emit` to issue custom event names. :param data: The data to send to the client or clients. Data can be of type ``str``, ``bytes``, ``list`` or ``dict``. To send multiple arguments, use a tuple where each element is of one of the types indicated above. :param to: The recipient of the message. This can be set to the session ID of a client to address only that client, to any any custom room created by the application to address all the clients in that room, or to a list of custom room names. If this argument is omitted the event is broadcasted to all connected clients. :param room: Alias for the ``to`` parameter. :param skip_sid: The session ID of a client to skip when broadcasting to a room or to all clients. This can be used to prevent a message from being sent to the sender. To skip multiple sids, pass a list. :param namespace: The Socket.IO namespace for the event. If this argument is omitted the event is emitted to the default namespace. :param callback: If given, this function will be called to acknowledge the client has received the message. The arguments that will be passed to the function are those provided by the client. Callback functions can only be used when addressing an individual client. :param ignore_queue: Only used when a message queue is configured. If set to ``True``, the event is emitted to the clients directly, without going through the queue. This is more efficient, but only works when a single server process is used. It is recommended to always leave this parameter with its default value of ``False``. �message)rrr r rrrN)r)rrrr r rrrs r�sendz Server.send�s<��L � � �)�$�2�D�8�%��+� � -� -� -� -� -r�<c�� � �|�|�td���|jstd���|j���� g� � � fd�}|�|||p||||���� �|���stj���t� d��dkr� dn(t� d��dkr� ddndS) a�Emit a custom event to a client and wait for the response. This method issues an emit with a callback and waits for the callback to be invoked before returning. If the callback isn't invoked before the timeout, then a ``TimeoutError`` exception is raised. If the Socket.IO connection drops during the wait, this method still waits until the specified timeout. :param event: The event name. It can be any string. The event names ``'connect'``, ``'message'`` and ``'disconnect'`` are reserved and should not be used. :param data: The data to send to the client or clients. Data can be of type ``str``, ``bytes``, ``list`` or ``dict``. To send multiple arguments, use a tuple where each element is of one of the types indicated above. :param to: The session ID of the recipient client. :param sid: Alias for the ``to`` parameter. :param namespace: The Socket.IO namespace for the event. If this argument is omitted the event is emitted to the default namespace. :param timeout: The waiting timeout. If the timeout is reached before the client acknowledges the event, then a ``TimeoutError`` exception is raised. :param ignore_queue: Only used when a message queue is configured. If set to ``True``, the event is emitted to the client directly, without going through the queue. This is more efficient, but only works when a single server process is used. It is recommended to always leave this parameter with its default value of ``False``. Note: this method is not thread safe. If multiple threads are emitting at the same time to the same client, then messages composed of multiple packets may end up being sent in an incorrect sequence. Use standard concurrency solutions (such as a Lock object) to prevent this situation. NzCannot use call() to broadcast.z/Cannot use call() when async_handlers is False.c�Z����|������dS�N)�append�set)�args� callback_args�callback_events ��r�event_callbackz#Server.call.<locals>.event_callbacks/��� � � �� &� &� &� � � � � � � � r)rr rrr)�timeoutrr) � ValueError�async_handlers� RuntimeError�eio� create_eventr�waitr� TimeoutError�len) rrrr�sidrr(rr'r%r&s @@r�callz Server.call�s#����N �:�#�+��>�?�?� ?��"� C��A�C�C� C���.�.�0�0��� � !� !� !� !� !� !� � � �%�d���s�i�)� � � F� F� F��"�"�7�"�3�3� ,��)�+�+� +�#&�}�Q�'7�#8�#8�1�#<�#<�}�Q���(+�M�!�,<�(=�(=��(B�(B��q�!�!�$�$�� rc��|pd}|j�d|||��|j�|||��dS)a�Enter a room. This function adds the client to a room. The :func:`emit` and :func:`send` functions can optionally broadcast events to all the clients in a room. :param sid: Session ID of the client. :param room: Room name. If the room does not exist it is created. :param namespace: The Socket.IO namespace for the event. If this argument is omitted the default namespace is used. r z%s is entering room %s [%s]N)rrr� enter_room�rr1r rs rr4zServer.enter_roomsK���$�� � � ���6��T�9�M�M�M� � ����Y��5�5�5�5�5rc��|pd}|j�d|||��|j�|||��dS)a2Leave a room. This function removes the client from a room. :param sid: Session ID of the client. :param room: Room name. :param namespace: The Socket.IO namespace for the event. If this argument is omitted the default namespace is used. r z%s is leaving room %s [%s]N)rrr� leave_roomr5s rr7zServer.leave_roomsK���$�� � � ���5�s�D�)�L�L�L� � ����Y��5�5�5�5�5rc�|�|pd}|j�d||��|j�||��dS)aClose a room. This function removes all the clients from the given room. :param room: Room name. :param namespace: The Socket.IO namespace for the event. If this argument is omitted the default namespace is used. r zroom %s is closing [%s]N)rrr� close_room)rr rs rr9zServer.close_room-sG���$�� � � ���2�D�)�D�D�D� � ����i�0�0�0�0�0rc��|pd}|j�||��}|j�|��}|�|i��S)a�Return the user session for a client. :param sid: The session id of the client. :param namespace: The Socket.IO namespace. If this argument is omitted the default namespace is used. The return value is a dictionary. Modifications made to this dictionary are not guaranteed to be preserved unless ``save_session()`` is called, or when the ``session`` context manager is used. r )r�eio_sid_from_sidr,� get_session� setdefault)rr1r�eio_sid� eio_sessions rr<zServer.get_session:sP���$�� ��,�/�/��Y�?�?���h�*�*�7�3�3� ��%�%�i��4�4�4rc��|pd}|j�||��}|j�|��}|||<dS)aStore the user session for a client. :param sid: The session id of the client. :param session: The session dictionary. :param namespace: The Socket.IO namespace. If this argument is omitted the default namespace is used. r N)rr;r,r<)rr1�sessionrr>r?s r� save_sessionzServer.save_sessionKsJ���$�� ��,�/�/��Y�?�?���h�*�*�7�3�3� �!(� �I���rc�@���G��fd�d��}||����S)aNReturn the user session for a client with context manager syntax. :param sid: The session id of the client. This is a context manager that returns the user session dictionary for the client. Any changes that are made to this dictionary inside the context manager block are saved back to the session. Example usage:: @sio.on('connect') def on_connect(sid, environ): username = authenticate_user(environ) if not username: return False with sio.session(sid) as session: session['username'] = username @sio.on('message') def on_message(sid, msg): with sio.session(sid) as session: print('received message from ', session['username']) c�.��eZdZd�Z��fd�Z��fd�ZdS)�0Server.session.<locals>._session_context_managerc�>�||_||_||_d|_dSr!)�serverr1rrA)rrGr1rs r�__init__z9Server.session.<locals>._session_context_manager.__init__os"��$�� ����!*���#�� � � rc�T��|j������|_|jS�N�r)rGr<rA)rrr1s ��r� __enter__z:Server.session.<locals>._session_context_manager.__enter__us0���#�{�6�6�s�AJ� 7� L� L�� ��|�#rc�L��|j��|j����dSrJ)rGrBrA)rr$rr1s ��r�__exit__z9Server.session.<locals>._session_context_manager.__exit__zs5���� �(�(��d�l�3<�)�>�>�>�>�>rN)�__name__� __module__� __qualname__rHrLrN)rr1s��r�_session_context_managerrEns`������� $� $� $�  $� $� $� $� $� $�  >� >� >� >� >� >� >� >rrR�)rr1rrRs `` rrAzServer.sessionXsR����, >� >� >� >� >� >� >� >� >� >� >� (�'��c�9�=�=�=rc���|pd}|r|j�||��}n|j�||��}|r�|j�d||��|j�||���}|�||�tj |�����|� d|||j j ��|j� ||d���dSdS)aSDisconnect a client. :param sid: Session ID of the client. :param namespace: The Socket.IO namespace to disconnect. If this argument is omitted the default namespace is used. :param ignore_queue: Only used when a message queue is configured. If set to ``True``, the disconnect is processed locally, without broadcasting on the queue. It is recommended to always leave this parameter with its default value of ``False``. r zDisconnecting %s [%s]rK� disconnectT)rrN)r� is_connected�can_disconnectrr�pre_disconnect� _send_packet� packet_classr� DISCONNECT�_trigger_event�reason�SERVER_DISCONNECTrU)rr1rr� delete_itr>s rrUzServer.disconnect�s���$�� � � D�� �1�1�#�y�A�A�I�I�� �3�3�C��C�C�I� � 7� �K� � �4�c�9� E� E� E��l�1�1�#��1�K�K�G� � � �g�t�'8�'8��!�Y�(9�(8�(8� 9� 9� 9� � � � �i�� $� � =� ?� ?� ?� �L� #� #�C�9�15� $� 7� 7� 7� 7� 7� 7� 7rc�l�|j�d��|j���dS)z�Stop Socket.IO background tasks. This method stops all background activity initiated by the Socket.IO server. It must be called before shutting down the web server. zSocket.IO is shutting downN)rrr,�shutdown�rs rrazServer.shutdown�s5�� � ���5�6�6�6� ��������rc�8�|j�||��S)a+Handle an HTTP request from the client. This is the entry point of the Socket.IO application, using the same interface as a WSGI application. For the typical usage, this function is invoked by the :class:`Middleware` instance, but it can be invoked directly when the middleware is not used. :param environ: The WSGI environment. :param start_response: The WSGI ``start_response`` function. This function returns the HTTP response body to deliver to the client as a byte sequence. )r,�handle_request)r�environ�start_responses rrdzServer.handle_request�s���x�&�&�w��?�?�?rc�.�|jj|g|�Ri|��S)aOStart a background task using the appropriate async model. This is a utility function that applications can use to start a background task using the method that is compatible with the selected async mode. :param target: the target function to execute. :param args: arguments to pass to the function. :param kwargs: keyword arguments to pass to the function. This function returns an object that represents the background task, on which the ``join()`` methond can be invoked to wait for the task to complete. )r,�start_background_task)r�targetr$�kwargss rrhzServer.start_background_task�s)��.�t�x�-�f�F�t�F�F�F�v�F�F�Frrc�6�|j�|��S)aSleep for the requested amount of time using the appropriate async model. This is a utility function that applications can use to put a task to sleep without having to worry about using the correct call for the selected async mode. )r,�sleep)r�secondss rrlz Server.sleep�s���x�~�~�g�&�&�&r� development�/admin�c �2�ddlm}||||||||���S)a�Instrument the Socket.IO server for monitoring with the `Socket.IO Admin UI <https://socket.io/docs/v4/admin-ui/>`_. :param auth: Authentication credentials for Admin UI access. Set to a dictionary with the expected login (usually ``username`` and ``password``) or a list of dictionaries if more than one set of credentials need to be available. For more complex authentication methods, set to a callable that receives the authentication dictionary as an argument and returns ``True`` if the user is allowed or ``False`` otherwise. To disable authentication, set this argument to ``False`` (not recommended, never do this on a production server). :param mode: The reporting mode. The default is ``'development'``, which is best used while debugging, as it may have a significant performance effect. Set to ``'production'`` to reduce the amount of information that is reported to the admin UI. :param read_only: If set to ``True``, the admin interface will be read-only, with no option to modify room assignments or disconnect clients. The default is ``False``. :param server_id: The server name to use for this server. If this argument is omitted, the server generates its own name. :param namespace: The Socket.IO namespace to use for the admin interface. The default is ``/admin``. :param server_stats_interval: The interval in seconds at which the server emits a summary of it stats to all connected admins. r)�InstrumentedServer)�auth�mode� read_only� server_idr�server_stats_interval)�adminrr)rrsrtrurvrrwrrs r� instrumentzServer.instrument�sB��B .�-�-�-�-�-�!�!� �t�$�)��9�"7�9�9�9� 9rc���|���}t|t��r"|D]}|j�||���dS|j�||��dS)z$Send a Socket.IO packet to a client.N)�encode� isinstance�listr,r)rr>�pkt�encoded_packet�eps rrYzServer._send_packet�sq�������� �n�d� +� +� 3�$� +� +���� � �g�r�*�*�*�*� +� +� �H�M�M�'�>� 2� 2� 2� 2� 2rc�<�|j�||��dS)z(Send a raw Engine.IO packet to a client.N)r,� send_packet)rr>�eio_pkts r�_send_eio_packetzServer._send_eio_packet�s �� ����W�g�.�.�.�.�.rc���|pd}d}||jvs||jvs|jdks ||jvr|j�||��}|�8|�||�tjd|�����dS|j r8|�||�tj d|i|�����tj ��j } |r%|�d|||j||��}nY |�d|||j|��}n4#t $r'|�d|||j|d��}YnwxYwn%#tj $r}|j }d }Yd}~nd}~wwxYw|d ur�|j rR|j�||��|�||�tj||�����n6|�||�tj||�����|j�||d � ��dS|j s:|�||�tj d|i|�����dSdS) z#Handle a client connection request.r N�*zUnable to connect)rrr1rK�connectFT�r)�handlers�namespace_handlers� namespacesrr�rYrZr� CONNECT_ERROR�always_connect�CONNECTr�ConnectionRefusedError� error_argsr\re� TypeErrorrXr[rU)rr>rrr1� fail_reason�success�excs r�_handle_connectzServer._handle_connects3���$�� ��� �� � %� %��d�6M�)M�)M��?�c�)�)�Y�$�/�-I�-I��,�&�&�w� �:�:�C� �;� � � �g�t�'8�'8��$�+>�#�(9�(%�(%� &� &� &� �F� � � D� � � �g�t�'8�'8����� � �(9�(C�(C� D� D� D� �7�9�9�D� � �� P��-�-��y�#�t�|�G�/D�d�L�L���P�"�1�1�!�9�c�4�<��3H�J�J�G�G�� �P�P�P�"�1�1�!�9�c�4�<��3H�$�P�P�G�G�G�P�������0� � � ��.�K��G�G�G�G�G�G����� ���� �e� � ��"� *�� �+�+�C��;�;�;��!�!�'�4�+<�+<��%�K�9�,=�,N�,N�O�O�O�O��!�!�'�4�+<�+<��(�{�'�,=�,)�,)�*�*�*� �L� #� #�C��� #� F� F� F� F� F��$� D� � � �g�t�'8�'8����� � �(9�(C�(C� D� D� D� D� D� D� Ds<�'E�#D&�%E�&.E�E�E�E�E=�* E8�8E=c�8�|pd}|j�||��}|j�||��sdS|j�||���|�d|||p |jj��|j�||d���dS)zHandle a client disconnect.r NrKrUTr�)r�sid_from_eio_sidrVrXr\r]�CLIENT_DISCONNECTrU)rr>rr]r1s r�_handle_disconnectzServer._handle_disconnect1s����$�� ��l�+�+�G�Y�?�?���|�(�(��i�8�8� � �F� � �#�#�C�9�#�=�=�=� ���L�)�S�"�C�d�k�&C� E� E� E� � ����Y�T��B�B�B�B�Brc ��|pd}|j�||��}|j�d|d||��|j�||��s|j�d||��dS|jr"|�|j||||||��dS|�||||||��dS)z Handle an incoming client event.r z received event "%s" from %s [%s]rz#%s is not connected to namespace %sN) rr�rrrV�warningr*rh�_handle_event_internal�rr>r�idrr1s r� _handle_eventzServer._handle_event<s���$�� ��l�+�+�G�Y�?�?�� � ���;�T�!�W�c�"� $� $� $��|�(�(��i�8�8� � �K� � � E� #�Y� 0� 0� 0� �F� � � ,� � &� &�t�'B�D�#�'.��i�� E� E� E� E� E� � '� '��c�7�D�)�(*� ,� ,� ,� ,� ,rc �,�|j|d||g|dd��R�}||jkrh|�h|�g}n(t|t��rt |��}n|g}|�||�tj|||�����dSdSdS)Nrr)rr�r) r\� not_handledr|�tupler}rYrZr�ACK)rrGr1r>rrr��rs rr�zServer._handle_event_internalMs��� !�F� !�$�q�'�9�c� E�D����H� E� E� E�� �� � � �R�^��y�����A�u�%�%� ��A�w�w����s�� � � ���):�):�� �i�B�T�*;�*C�*C� D� D� D� D� D� !� �^�^rc��|pd}|j�||��}|j�d||��|j�|||��dS)z#Handle ACK packets from the client.r zreceived ack from %s [%s]N)rr�rr�trigger_callbackr�s r� _handle_ackzServer._handle_ack\s^���$�� ��l�+�+�G�Y�?�?�� � ���4�c�9�E�E�E� � �%�%�c�2�t�4�4�4�4�4rc���|�|||��\}}|r* ||�S#t$r|dkr||dd��cYS�wxYw|�||��\}}|r|j|g|�R�S|jS)z$Invoke an application event handler.rUN�����)�_get_event_handlerr��_get_namespace_handler� trigger_eventr�)rrrr$�handlers rr\zServer._trigger_eventcs����/�/��y�$�G�G� ��� � � ��w��~�%��� � � ��L�(�(�"�7�D��"��I�.�.�.�.��  �����3�3�I�t�D�D� ��� � $�(�7�(��6��6�6�6� 6��#� #s�#�A�Ac�h�|js d|_|j���||j|<dS)z&Handle the Engine.IO connection event.TN)�manager_initializedr� initializere)rr>res r�_handle_eio_connectzServer._handle_eio_connectws;���'� &�'+�D� $� �L� #� #� %� %� %� '�� �W���rc��||jvr�|j|}|�|��ro|j|=|jtjkr)|�||j|j|j��dS|� ||j|j|j��dSdS|� |���}|jtj kr#|� ||j|j��dS|jtj kr(|�||j|jj��dS|jtjkr)|�||j|j|j��dS|jtjkr)|� ||j|j|j��dS|jtjks|jtjkr ||j|<dS|jtjkrt+d���t+d���)zDispatch Engine.IO messages.)rz Unexpected CONNECT_ERROR packet.zUnknown packet type.N)�_binary_packet�add_attachment� packet_typer� BINARY_EVENTr�rr�rr�rZr�r�r[r�r]r��EVENTr�� BINARY_ACKr�r))rr>rr~s r�_handle_eio_messagezServer._handle_eio_message~s �� �d�)� )� )��%�g�.�C��!�!�$�'�'� O��'��0��?�f�&9�9�9��&�&�w�� �s�v�'*�x�1�1�1�1�1��$�$�W�c�m�S�V�S�X�N�N�N�N�N�  O� O��#�#�4�#�8�8�C���&�.�0�0��$�$�W�c�m�S�X�F�F�F�F�F���F�$5�5�5��'�'����(,� �(E�G�G�G�G�G���F�L�0�0��"�"�7�C�M�3�6�3�8�L�L�L�L�L���F�J�.�.�� � ��#�-�����J�J�J�J�J���F�$7�7�7��O�v�'8�8�8�/2��#�G�,�,�,���F�$8�8�8� �!C�D�D�D� �!7�8�8�8rc���t|j��������D]}|�|||���||jvr |j|=dSdS)z"Handle Engine.IO disconnect event.N)r}r�get_namespaces�copyr�re)rr>r]�ns r�_handle_eio_disconnectzServer._handle_eio_disconnect�ss���d�l�1�1�3�3�4�4�9�9�;�;� 8� 8�A� � #� #�G�Q�� 7� 7� 7� 7� �d�l� "� "�� �W�%�%�%� #� "rc��tjSr!)�engineiorrbs r�_engineio_server_classzServer._engineio_server_class�s ����r)NNNNNNF)NNNNNF)NNNNrFr!)NF)r)NrnFNrorp)rOrPrQ�__doc__rrr2r4r7r9r<rBrArUrardrhrlryrYr�r�r�r�r�r�r\r�r�r�r�rSrrrr s8������h�h�RCG�9>�25�25�25�25�hGK�).�(-�(-�(-�(-�TCG�&+�9�9�9�9�v6�6�6�6� 6� 6� 6� 6� 1� 1� 1� 1�5�5�5�5�" )� )� )� )�&>�&>�&>�&>�P7�7�7�7�6���@�@�@� G�G�G�"'�'�'�'�CH�-5�)*�%9�%9�%9�%9�N3�3�3�/�/�/�,D�,D�,D�\ C� C� C� C�,�,�,�" D� D� D�5�5�5�$�$�$�((�(�(�9�9�9�<&�&�&�����rr) �loggingr��rrr� getLogger�default_logger� BaseServerrrSrr�<module>r�s�����������������������������"��"�#4�5�5��X �X �X �X �X �[� #�X �X �X �X �X r
Memory