
    2BfPt                     n    d dl Z d dlZddlmZ ddlmZ ddlmZ ddlmZ  G d dej                        Zy)	    N   )asyncio_manager)
exceptions)packet)serverc                        e Zd ZdZ	 	 d fd	Zd ZddZ	 	 ddZ	 	 ddZ	 	 d dZ	d!dZ
d!d	Zd!d
Zd!dZd"dZd Zd Zd#dZd$dZd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z xZS )%AsyncServeray  A Socket.IO server for asyncio.

    This class implements a fully compliant Socket.IO web server with support
    for websocket and long-polling transports, compatible with the asyncio
    framework.

    :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``. Note that fatal
                   errors are logged even when ``logger`` is ``False``.
    :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 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 5 seconds.
    :param max_http_buffer_size: The maximum size of a message when using the
                                 polling transport. The default is 1,000,000
                                 bytes.
    :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 tot he 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 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``.
    c                 Z    |t        j                         }t        |   d||||d| y )N)client_managerloggerjsonasync_handlers )r   AsyncManagersuper__init__)selfr   r   r   r   kwargs	__class__s         W/var/www/highfloat_scraper/venv/lib/python3.12/site-packages/socketio/asyncio_server.pyr   zAsyncServer.__init__c   s=    !,99;N 	Mv">	MEK	M    c                      y)NTr   r   s    r   is_asyncio_basedzAsyncServer.is_asyncio_basedj   s    r   c                 <    | j                   j                  ||       y)z.Attach the Socket.IO server to an application.N)eioattach)r   appsocketio_paths      r   r   zAsyncServer.attachm   s    ]+r   c                    K   |xs d}|xs |}| j                   j                  d||xs d|        | j                  j                  |||f|||d| d{    y7 w)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
                   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.
        :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 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 designed to be used concurrently. If multiple
        tasks are emitting at the same time to the same client connection, 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.

        Note 2: this method is a coroutine.
        /zemitting event "%s" to %s [%s]all)roomskip_sidcallbackN)r   infomanageremit)	r   eventdatator#   r$   	namespacer%   r   s	            r   r(   zAsyncServer.emitq   st     Z $	zT95		3dlltY *T)1H*"(* 	* 	*s   AAAAc           
      R   K    | j                   d||||||d| d{    y7 w)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.
        :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 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 a coroutine.
        )r*   r+   r#   r$   r,   r%   N)message)r(   )r   r*   r+   r#   r$   r,   r%   r   s           r   sendzAsyncServer.send   s<     N dii 5$!)Y!)5-35 	5 	5s   '%'c                   	
K   ||t        d      | j                  st        d      | j                  j	                         
g 		
fd} | j
                  |f||xs |||d| d{    	 t        j                  
j                         |       d{    t        	d         dkD  r	d   S t        	d         dk(  r	d   d   S dS 7 b7 7# t        j                  $ r t        j                         dw xY ww)a  Emit a custom event to a client and wait for the response.

        :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 designed to be used concurrently. If multiple
        tasks are emitting at the same time to the same client connection, 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.

        Note 2: this method is a coroutine.
        NzCannot use call() to broadcast.z/Cannot use call() when async_handlers is False.c                  H    j                  |        j                          y N)appendset)argscallback_argscallback_events    r   event_callbackz(AsyncServer.call.<locals>.event_callback   s      & r   )r*   r#   r,   r%   r   r   )
ValueErrorr   RuntimeErrorr   create_eventr(   asynciowait_forwaitTimeoutErrorr   len)r   r)   r*   r+   sidr,   timeoutr   r8   r6   r7   s            @@r   callzAsyncServer.call   s,    F :#+>??""AC C..0	! dii ;DrySI!/;39; 	; 	;	6"">#6#6#8'BBB $'}Q'7#81#<}Q 	(+M!,<(=(Bq!!$			; C## 	6))+5	6s<   A(C?,C-C?2'C CC 2C?C )C<<C?c                    K   |xs d}| j                   j                  d||       | j                  j                  ||       d{    y7 w)a<  Close 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.

        Note: this method is a coroutine.
        r!   zroom %s is closing [%s]N)r   r&   r'   
close_room)r   r#   r,   s      r   rE   zAsyncServer.close_room
  sC      $	2D)Dll%%dI666s   AAAAc                    K   |xs d}| j                   j                  ||      }| j                  j                  |       d{   }|j	                  |i       S 7 w)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. If you want to modify
        the user session, use the ``session`` context manager instead.
        r!   N)r'   eio_sid_from_sidr   get_session
setdefault)r   rA   r,   eio_sideio_sessions        r   rH   zAsyncServer.get_session  sW      $	,,//Y? HH0099%%i44 :s   AAAAc                    K   |xs d}| j                   j                  ||      }| j                  j                  |       d{   }|||<   y7 
w)a  Store 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)r'   rG   r   rH   )r   rA   sessionr,   rJ   rK   s         r   save_sessionzAsyncServer.save_session)  sN      $	,,//Y? HH0099!(I :s   AAAAc                 :     G fddt               } || |      S )aT  Return 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::

            @eio.on('connect')
            def on_connect(sid, environ):
                username = authenticate_user(environ)
                if not username:
                    return False
                with eio.session(sid) as session:
                    session['username'] = username

            @eio.on('message')
            def on_message(sid, msg):
                async with eio.session(sid) as session:
                    print('received message from ', session['username'])
        c                   (    e Zd Zd Z fdZ fdZy)5AsyncServer.session.<locals>._session_context_managerc                 <    || _         || _        || _        d | _        y r2   )r   rA   r,   rM   )r   r   rA   r,   s       r   r   z>AsyncServer.session.<locals>._session_context_manager.__init__M  s    $!*#r   c                    K   | j                   j                  | j                         d {   | _        | j                  S 7 wNr,   )r   rH   r,   rM   )r   rA   s    r   
__aenter__z@AsyncServer.session.<locals>._session_context_manager.__aenter__S  s?     %)[[%<%<4>> &= &3  3||# 3s   +AAAc                    K   | j                   j                  | j                  | j                         d {    y 7 wrT   )r   rN   rM   r,   )r   r5   rA   s     r   	__aexit__z?AsyncServer.session.<locals>._session_context_manager.__aexit__X  s:     kk..sDLL9= / I I Is   6A?AN)__name__
__module____qualname__r   rV   rX   )rA   s   r   _session_context_managerrQ   L  s    $$
Ir   r\   )object)r   rA   r,   r\   s    `  r   rM   zAsyncServer.session6  s"    ,	Iv 	I  (c9==r   c                   K   |xs d}|r| j                   j                  ||      }n$| j                   j                  ||       d{   }|r| j                  j	                  d||       | j                   j                  ||      }| j                  || j                  t        j                  |             d{    | j                  d||       d{    | j                   j                  ||       yy7 7 @7 'w)a~  Disconnect 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``.

        Note: this method is a coroutine.
        r!   NzDisconnecting %s [%s]rU   
disconnect)r'   is_connectedcan_disconnectr   r&   pre_disconnect_send_packetpacket_classr   
DISCONNECT_trigger_eventr_   )r   rA   r,   ignore_queue	delete_itrJ   s         r   r_   zAsyncServer.disconnect^  s      $	11#yAI"ll99#yIIIKK4c9Ell11#1KG##GT->->!!Y .? .8 9 9 9%%lIsCCCLL##C9#=  J9Cs7   ADC;A4D<C==DC?$D=D?Dc                 V   K    | j                   j                  |i | d{   S 7 w)zHandle an HTTP request from the client.

        This is the entry point of the Socket.IO application. This function
        returns the HTTP response body to deliver to the client.

        Note: this method is a coroutine.
        N)r   handle_request)r   r5   r   s      r   rj   zAsyncServer.handle_requesty  s*      -TXX,,d=f====s    )')c                 B     | j                   j                  |g|i |S )a  Start 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. Must be a coroutine.
        :param args: arguments to pass to the function.
        :param kwargs: keyword arguments to pass to the function.

        The return value is a ``asyncio.Task`` object.

        Note: this method is a coroutine.
        )r   start_background_task)r   targetr5   r   s       r   rl   z!AsyncServer.start_background_task  s%     .txx--fFtFvFFr   c                 T   K   | j                   j                  |       d{   S 7 w)a<  Sleep 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.

        Note: this method is a coroutine.
        N)r   sleep)r   secondss     r   ro   zAsyncServer.sleep  s!      XX^^G,,,,s   (&(c           	         K   t        |t              rt        |      }n||g}ng }| j                  || j	                  t
        j                  ||g|z   |             d{    y7 w)zSend a message to a client.N)r,   r*   id)
isinstancetuplelistrc   rd   r   EVENT)r   rA   r)   r*   r,   rr   s         r   _emit_internalzAsyncServer._emit_internal  sp      dE":D6DDT%6%6LLIUGdNr &7 &K L 	L 	Ls   AA)!A'"A)c                    K   |j                         }t        |t              r,|D ]&  }| j                  j	                  ||       d{    ( y| j                  j	                  ||       d{    y7 ,7 w)z$Send a Socket.IO packet to a client.N)encoders   ru   r   r/   )r   rJ   pktencoded_packeteps        r   rc   zAsyncServer._send_packet  se     nd+$ 1hhmmGR0001 ((--888 18s$   AA8A4&A8.A6/A86A8c                   K   |xs d}| j                   j                  ||      }| j                  r<| j                  || j	                  t
        j                  d|i|             d{    t        j                         j                  }	 |r+| j                  d||| j                  |   |       d{   }n*	 | j                  d||| j                  |          d{   }|du r| j                  rW| j                   j                  ||       | j                  || j	                  t
        j                  ||             d{    n:| j                  || j	                  t
        j                  ||             d{    | j                   j!                  ||       y| j                  s=| j                  || j	                  t
        j                  d|i|             d{    yy7 7 ;7 # t        $ r/ | j                  d||| j                  |   d       d{  7  }Y Hw xY w# t        j                  $ r}|j                  }d}Y d}~sd}~ww xY w7 7 7 ~w)z#Handle a client connection request.r!   rA   rU   NconnectF)r*   r,   )r'   r~   always_connectrc   rd   r   CONNECTr   ConnectionRefusedError
error_argsrf   environ	TypeErrorrb   re   CONNECT_ERRORr_   )r   rJ   r,   r*   rA   fail_reasonsuccessexcs           r   _handle_connectzAsyncServer._handle_connect  sw    $	ll""7I6##GT->->	 .? .C D D D 779DD	 $ 3 3y#t||G/Dd!L LP$($7$7!9c4<<3H%J JG e""++C;''1B1B%%K9 2C 2N O O O ''1B1B(({' 2C 2) * * * LL##C3$$##GT->->	 .? .C D D D %9D
LJ  P$($7$7!9c4<<3H$%P P PGP 00 	..KG	O*
Ds   A&I%(G+)"I%'H/ 3G.4H/ :$G4 G1G4 #A!I%I:I%?I! A$I%$I#%I%.H/ 1G4 4.H,"H%#H,(H/ +H,,H/ /III%II%!I%#I%c                 6  K   |xs d}| j                   j                  ||      }| j                   j                  ||      sy| j                   j                  ||       | j	                  d||       d{    | j                   j                  ||       y7 !w)zHandle a client disconnect.r!   NrU   r_   )r'   sid_from_eio_sidr`   rb   rf   r_   )r   rJ   r,   rA   s       r   _handle_disconnectzAsyncServer._handle_disconnect  s     $	ll++GY?||((i8##C9#=!!,	3???Y/ 	@s   A3B5B6"Bc           	        K   |xs d}| j                   j                  ||      }| j                  j                  d|d   ||       | j                   j	                  ||      s| j                  j                  d||       y| j                  r"| j                  | j                  | |||||       y| j                  | |||||       d{    y7 w)z Handle an incoming client event.r!   z received event "%s" from %s [%s]r   z#%s is not connected to namespace %sN)	r'   r   r   r&   r`   warningr   rl   _handle_event_internalr   rJ   r,   rr   r*   rA   s         r   _handle_eventzAsyncServer._handle_event  s     $	ll++GY?;T!Wc"	$||((i8KK E #Y0&&t'B'BD#'.iE --dC$.7= = =s   CCCCc           	         K    |j                   |d   ||g|dd    d {   }|a|g }nt        |t              rt        |      }n|g} |j                  || j                  t        j                  |||             d {    y y 7 h7 w)Nr   r   )r,   rr   r*   )rf   rs   rt   ru   rc   rd   r   ACK)r   r   rA   rJ   r*   r,   rr   rs           r   r   z"AsyncServer._handle_event_internal  s     '&''QCK$qr(KK> yAu%Aws%&%%gt/@/@

iBT 0A 0C D D D  LDs"   BB
A!BBBBc                    K   |xs d}| j                   j                  ||      }| j                  j                  d||       | j                   j	                  |||       d{    y7 w)z#Handle ACK packets from the client.r!   zreceived ack from %s [%s]N)r'   r   r   r&   trigger_callbackr   s         r   _handle_ackzAsyncServer._handle_ack  sY     $	ll++GY?4c9Ell++CT:::s   A A*"A(#A*c                   K   || j                   v ro|| j                   |   v r^t        j                  | j                   |   |         du r 	  | j                   |   |   |  d{   }|S  | j                   |   |   | }|S || j                  v r( | j                  |   j
                  |g|  d{   S y7 T# t        j                  $ r d}Y |S w xY w7 #w)z$Invoke an application event handler.TN)handlersr<   iscoroutinefunctionCancelledErrornamespace_handlerstrigger_event)r   r)   r,   r5   rets        r   rf   zAsyncServer._trigger_event  s     %%4==3K*K**4==+CE+JK ?i 8 ? FFC
 J 6dmmI.u5t<J $111I00;II   2 G-- C J	sI   AC
B9 "B7#B9 'A
C1C2C7B9 9CCCCc                    K   | j                   s!d| _         | j                  j                          || j                  |<   yw)z&Handle the Engine.IO connection event.TN)manager_initializedr'   
initializer   )r   rJ   r   s      r   _handle_eio_connectzAsyncServer._handle_eio_connect  s5     '''+D$LL##% 'Ws   >A c                 d  K   || j                   v r| j                   |   }|j                  |      r| j                   |= |j                  t        j                  k(  r;| j                  ||j                  |j                  |j                         d{    y| j                  ||j                  |j                  |j                         d{    yy| j                  |      }|j                  t        j                  k(  r0| j                  ||j                  |j                         d{    y|j                  t        j                  k(  r%| j                  ||j                         d{    y|j                  t        j                  k(  r;| j                  ||j                  |j                  |j                         d{    y|j                  t        j                   k(  r;| j                  ||j                  |j                  |j                         d{    y|j                  t        j                  k(  s|j                  t        j"                  k(  r|| j                   |<   y|j                  t        j$                  k(  rt'        d      t'        d      7 7 7 {7 <7 7 w)zDispatch Engine.IO messages.N)r{   z Unexpected CONNECT_ERROR packet.zUnknown packet type.)_binary_packetadd_attachmentpacket_typer   BINARY_EVENTr   r,   rr   r*   r   rd   r   r   re   r   rv   r   
BINARY_ACKr   r9   )r   rJ   r*   rz   s       r   _handle_eio_messagezAsyncServer._handle_eio_message&  s    d)))%%g.C!!$'''0??f&9&99,,WcmmSVV-0XX7 7 7 **7CMM366+.885 5 5 ( ##4#8C&..0**7CMM388LLLF$5$55--gs}}EEEFLL0((#--),3 3 3FJJ.&&wsvv'*xx1 1 1F$7$77OOv'8'88/2##G,F$8$88 !CDD !788/75
 ME31sq   BJ0J :J0J#AJ0+J&,AJ0-J).AJ0J,AJ0J.BJ0#J0&J0)J0,J0.J0c                    K   t        | j                  j                               j                         D ]  }| j	                  ||       d{     || j
                  v r| j
                  |= yy7 #w)z"Handle Engine.IO disconnect event.N)ru   r'   get_namespacescopyr   r   )r   rJ   ns      r   _handle_eio_disconnectz"AsyncServer._handle_eio_disconnectF  sh     dll113499; 	6A))'1555	6dll"W% # 6s   A
A2A0$A2c                 "    t         j                  S r2   )engineior	   r   s    r   _engineio_server_classz"AsyncServer._engineio_server_classM  s    ###r   )NFNT)z	socket.io)NNNNNN)NNNNN)NNNN<   r2   )NF)r   )NN)rY   rZ   r[   __doc__r   r   r   r(   r/   rC   rE   rH   rN   rM   r_   rj   rl   ro   rw   rc   r   r   r   r   r   rf   r   r   r   r   __classcell__)r   s   @r   r	   r	      s    Vn @D $M, IM,03*j =A,0)5V IM7r75 )&>P>6>G"
-L9#DJ0="D;&(9@&$r   r	   )	r<   r    r   r   r   r   Serverr	   r   r   r   <module>r      s)         C	$&-- C	$r   