Ë
    ·�©jDj  ã                  óÜ  — d dl mZ d dlZd dlZd dlZd dlmZ ddlmZm	Z	m
Z
mZmZmZ ddlmZ ddlmZmZmZmZmZmZmZmZmZmZ ddlmZmZ dd	lmZ dd
l m!Z!m"Z"m#Z#m$Z$ g d¢Z%eez  ez  Z&	  G d„ dejN                  «      Z(e(jR                  Z)e(jT                  Z* G d„ dejN                  «      Z+e+jX                  Z,e+jZ                  Z-e+j\                  Z.e+j^                  Z/dZ0	  G d„ d«      Z1y)é    )ÚannotationsN)Ú	Generatoré   )ÚConnectionClosedÚConnectionClosedErrorÚConnectionClosedOKÚInvalidStateÚPayloadTooBigÚProtocolError)Ú	Extension)
ÚBINARYÚCLOSEÚCONTÚOK_CLOSE_CODESÚPINGÚPONGÚTEXTÚCloseÚ	CloseCodeÚFrame)ÚRequestÚResponse)ÚStreamReader)Ú	BytesLikeÚ
LoggerLikeÚOriginÚSubprotocol)ÚProtocolÚSideÚStateÚSEND_EOFc                  ó&   — e Zd ZdZ ed«      \  ZZy)r   z6A WebSocket connection is either a server or a client.é   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚrangeÚSERVERÚCLIENT© ó    úZ/var/www/html/streamforge-license/venv/lib/python3.12/site-packages/websockets/protocol.pyr   r   -   s   „ Ù@á˜1“X�N€F‰Fr,   r   c                  ó*   — e Zd ZdZ ed«      \  ZZZZy)r    z6A WebSocket connection is in one of these four states.é   N)	r$   r%   r&   r'   r(   Ú
CONNECTINGÚOPENÚCLOSINGÚCLOSEDr+   r,   r-   r    r    7   s   „ Ù@á(-¨a«Ñ%€J��g™vr,   r    r,   c                  ó2  — e Zd ZdZedddœ	 	 	 	 	 	 	 	 	 dd„Zedd„«       Zej                  dd„«       Zedd„«       Z	ed d	„«       Z
ed!d
„«       Zd"d„Zd#d„Zd$d„Zd%d$d„Zd%d$d„Zd&d'd„Zd(d„Zd(d„Zd)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y)0r   a÷  
    Sans-I/O implementation of a WebSocket connection.

    Args:
        side: :attr:`~Side.CLIENT` or :attr:`~Side.SERVER`.
        state: Initial state of the WebSocket connection.
        max_size: Maximum size of incoming messages in bytes.
            :obj:`None` disables the limit. You may pass a ``(max_message_size,
            max_fragment_size)`` tuple to set different limits for messages and
            fragments when you expect long messages sent in short fragments.
        logger: Logger for this connection; depending on ``side``,
            defaults to ``logging.getLogger("websockets.client")``
            or ``logging.getLogger("websockets.server")``;
            see the :doc:`logging guide <../../topics/logging>` for details.

    i   N)ÚstateÚmax_sizeÚloggerc               óœ  — t        j                  «       | _        	 |€0t        j                  d|j
                  j                  «       › �«      }|| _        	 |j                  t        j                  «      | _
        || _        || _        t        |t        «      s|€|d c| _        | _        n|\  | _        | _        d | _        d| _        d | _        g | _        d | _        d | _        d | _        d | _        d | _        	 d| _        t7        «       | _        g | _        g | _        | j?                  «       | _         tC        | j@                  «       d | _"        y )Nzwebsockets.F)#ÚuuidÚuuid4ÚidÚloggingÚ	getLoggerÚnameÚlowerr7   ÚisEnabledForÚDEBUGÚdebugÚsider5   Ú
isinstanceÚintÚmax_message_sizeÚmax_fragment_sizeÚcurrent_sizeÚexpect_continuation_frameÚoriginÚ
extensionsÚsubprotocolÚ
close_rcvdÚ
close_sentÚclose_rcvd_then_sentÚhandshake_excÚeof_sentr   ÚreaderÚeventsÚwritesÚparseÚparserÚnextÚ
parser_exc)ÚselfrC   r5   r6   r7   s        r-   Ú__init__zProtocol.__init__Y   s:  € ô "ŸZ™Z›\ˆŒØBð ˆ>Ü×&Ñ&¨°T·Y±Y·_±_Ó5FÐ4GÐ'HÓIˆFØ"(ˆŒØ)ð ×(Ñ(¬¯©Ó7ˆŒ
ð ˆŒ	ð ˆŒ
ô �h¤Ô$¨Ð(8Ø<DÀdÐ9ˆDÔ! 4Õ#9à<DÑ9ˆDÔ! 4Ô#9ð )-ˆÔð */ˆÔ&ð &*ˆŒØ+-ˆŒØ/3ˆÔð )-ˆŒØ(,ˆŒØ15ˆÔ!ð 04ˆÔð	ð ˆŒô #“nˆŒØ#%ˆŒØ#%ˆŒØ—j‘j“lˆŒÜˆT�[‰[ÔØ,0ˆ�r,   c                ó   — | j                   S )a­  
        State of the WebSocket connection.

        Defined in 4.1_, 4.2_, 7.1.3_, and 7.1.4_ of :rfc:`6455`.

        .. _4.1: https://datatracker.ietf.org/doc/html/rfc6455#section-4.1
        .. _4.2: https://datatracker.ietf.org/doc/html/rfc6455#section-4.2
        .. _7.1.3: https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.3
        .. _7.1.4: https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.4

        )Ú_state©rY   s    r-   r5   zProtocol.state    s   € ð �{‰{Ðr,   c                óv   — | j                   r&| j                  j                  d|j                  «       || _        y )Nz= connection is %s)rB   r7   r>   r\   )rY   r5   s     r-   r5   zProtocol.state¯   s)   € à�:Š:Ø�K‰K×ÑÐ2°E·J±JÔ?Øˆ�r,   c                óŒ   — | j                   t        ury| j                  €t        j                  S | j                  j
                  S )zþ
        WebSocket close code received from the remote endpoint.

        Defined in 7.1.5_ of :rfc:`6455`.

        .. _7.1.5: https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.5

        :obj:`None` if the connection isn't closed yet.

        N)r5   r3   rM   r   ÚABNORMAL_CLOSUREÚcoder]   s    r-   Ú
close_codezProtocol.close_codeµ   s9   € ð �:‰:œVÑ#ØØ�_‰_Ð$Ü×-Ñ-Ð-à—?‘?×'Ñ'Ð'r,   c                ón   — | j                   t        ury| j                  €y| j                  j                  S )a  
        WebSocket close reason  received from the remote endpoint.

        Defined in 7.1.6_ of :rfc:`6455`.

        .. _7.1.6: https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.6

        :obj:`None` if the connection isn't closed yet.

        NÚ )r5   r3   rM   Úreasonr]   s    r-   Úclose_reasonzProtocol.close_reasonÈ   s0   € ð �:‰:œVÑ#ØØ�_‰_Ð$Øà—?‘?×)Ñ)Ð)r,   c                ód  — | j                   t        u sJ d«       ‚| j                  �K| j                  �?| j                  j                  t
        v r#| j                  j                  t
        v rt        }nt        } || j                  | j                  | j                  «      }| j                  |_
        |S )aè  
        Exception to raise when trying to interact with a closed connection.

        Don't raise this exception while the connection :attr:`state`
        is :attr:`~websockets.protocol.State.CLOSING`; wait until
        it's :attr:`~websockets.protocol.State.CLOSED`.

        Indeed, the exception includes the close code and reason, which are
        known only once the connection is closed.

        Raises:
            AssertionError: If the connection isn't closed yet.

        zconnection isn't closed yet)r5   r3   rM   rN   ra   r   r   r   rO   rX   Ú	__cause__)rY   Úexc_typeÚexcs      r-   Ú	close_exczProtocol.close_excÛ   s“   € ð  �z‰zœVÑ#ÐBÐ%BÓBÐ#ð �O‰OÐ'Ø—‘Ð+Ø—‘×$Ñ$¬Ñ6Ø—‘×$Ñ$¬Ñ6ä)‰Hä,ˆHÙ (Ø�O‰OØ�O‰OØ×%Ñ%ó!
ˆð Ÿ™ˆŒØˆ
r,   c                ód   — | j                   j                  |«       t        | j                  «       y)aH  
        Receive data from the network.

        After calling this method:

        - You must call :meth:`data_to_send` and send this data to the network.
        - You should call :meth:`events_received` and process resulting events.

        Raises:
            EOFError: If :meth:`receive_eof` was called earlier.

        N)rR   Ú	feed_datarW   rV   ©rY   Údatas     r-   Úreceive_datazProtocol.receive_data  s"   € ð 	�‰×Ñ˜dÔ#ÜˆT�[‰[Õr,   c                ó�   — | j                   j                  ry| j                   j                  «        t        | j                  «       y)a¡  
        Receive the end of the data stream from the network.

        After calling this method:

        - You must call :meth:`data_to_send` and send this data to the network;
          it will return ``[b""]``, signaling the end of the stream, or ``[]``.
        - You aren't expected to call :meth:`events_received`; it won't return
          any new events.

        :meth:`receive_eof` is idempotent.

        N)rR   ÚeofÚfeed_eofrW   rV   r]   s    r-   Úreceive_eofzProtocol.receive_eof  s.   € ð �;‰;�?Š?ØØ�‰×ÑÔÜˆT�[‰[Õr,   c                ó  — | j                   st        d«      ‚| j                  t        ur0t	        d| j
                  j                  j                  «       › �«      ‚| | _         | j                  t        t        ||«      «       y)aõ  
        Send a `Continuation frame`_.

        .. _Continuation frame:
            https://datatracker.ietf.org/doc/html/rfc6455#section-5.6

        Parameters:
            data: payload containing the same kind of data
                as the initial frame.
            fin: FIN bit; set it to :obj:`True` if this is the last frame
                of a fragmented message and to :obj:`False` otherwise.

        Raises:
            ProtocolError: If a fragmented message isn't in progress.

        úunexpected continuation frameúconnection is N)rI   r   r\   r1   r	   r5   r>   r?   Ú
send_framer   r   ©rY   ro   Úfins      r-   Úsend_continuationzProtocol.send_continuation&  sh   € ð" ×-Ò-ÜÐ ?Ó@Ð@Ø�;‰;œdÑ"Ü °·
±
·±×0EÑ0EÓ0GÐ/HÐIÓJÐJØ-0¨ˆÔ&Ø�‰œœd D¨#Ó.Õ/r,   c                ó  — | j                   rt        d«      ‚| j                  t        ur0t	        d| j
                  j                  j                  «       › �«      ‚| | _         | j                  t        t        ||«      «       y)a£  
        Send a `Text frame`_.

        .. _Text frame:
            https://datatracker.ietf.org/doc/html/rfc6455#section-5.6

        Parameters:
            data: payload containing text encoded with UTF-8.
            fin: FIN bit; set it to :obj:`False` if this is the first frame of
                a fragmented message.

        Raises:
            ProtocolError: If a fragmented message is in progress.

        úexpected a continuation framerw   N)rI   r   r\   r1   r	   r5   r>   r?   rx   r   r   ry   s      r-   Ú	send_textzProtocol.send_text>  sh   € ð  ×)Ò)ÜÐ ?Ó@Ð@Ø�;‰;œdÑ"Ü °·
±
·±×0EÑ0EÓ0GÐ/HÐIÓJÐJØ-0¨ˆÔ&Ø�‰œœd D¨#Ó.Õ/r,   c                ó  — | j                   rt        d«      ‚| j                  t        ur0t	        d| j
                  j                  j                  «       › �«      ‚| | _         | j                  t        t        ||«      «       y)a¥  
        Send a `Binary frame`_.

        .. _Binary frame:
            https://datatracker.ietf.org/doc/html/rfc6455#section-5.6

        Parameters:
            data: payload containing arbitrary binary data.
            fin: FIN bit; set it to :obj:`False` if this is the first frame of
                a fragmented message.

        Raises:
            ProtocolError: If a fragmented message is in progress.

        r}   rw   N)rI   r   r\   r1   r	   r5   r>   r?   rx   r   r   ry   s      r-   Úsend_binaryzProtocol.send_binaryU  sh   € ð  ×)Ò)ÜÐ ?Ó@Ð@Ø�;‰;œdÑ"Ü °·
±
·±×0EÑ0EÓ0GÐ/HÐIÓJÐJØ-0¨ˆÔ&Ø�‰œœf d¨CÓ0Õ1r,   c                óœ  — | j                   t        ur0t        d| j                  j                  j                  «       › �«      ‚|€-|dk7  rt        d«      ‚t        t        j                  d«      }d}nt        ||«      }|j                  «       }| j                  t        t        |«      «       | j                  �J ‚|| _        t         | _        y)a_  
        Send a `Close frame`_.

        .. _Close frame:
            https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.1

        Parameters:
            code: close code.
            reason: close reason.

        Raises:
            ProtocolError: If the code isn't valid or if a reason is provided
                without a code.

        rw   Nrd   z#cannot send a reason without a coder,   )r\   r1   r	   r5   r>   r?   r   r   r   ÚNO_STATUS_RCVDÚ	serializerx   r   r   rM   rN   r2   ©rY   ra   re   Úclosero   s        r-   Ú
send_closezProtocol.send_closel  s®   € ð$ �;‰;œdÑ"Ü °·
±
·±×0EÑ0EÓ0GÐ/HÐIÓJÐJØˆ<Ø˜Š|Ü#Ð$IÓJÐJÜœ)×2Ñ2°BÓ7ˆEØ‰Dä˜$ Ó'ˆEØ—?‘?Ó$ˆDà�‰œœe TÓ*Ô+ð �‰Ð&Ð&Ð&ØˆŒÜˆ�
r,   c                óê   — | j                   t        urB| j                   t        ur0t        d| j                  j
                  j                  «       › �«      ‚| j                  t        t        |«      «       y)zÚ
        Send a `Ping frame`_.

        .. _Ping frame:
            https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.2

        Parameters:
            data: payload containing arbitrary binary data.

        rw   N)
r\   r1   r2   r	   r5   r>   r?   rx   r   r   rn   s     r-   Ú	send_pingzProtocol.send_ping�  óR   € ð �;‰;œdÑ" t§{¡{¼'Ñ'AÜ °·
±
·±×0EÑ0EÓ0GÐ/HÐIÓJÐJØ�‰œœd DÓ)Õ*r,   c                óê   — | j                   t        urB| j                   t        ur0t        d| j                  j
                  j                  «       › �«      ‚| j                  t        t        |«      «       y)zÚ
        Send a `Pong frame`_.

        .. _Pong frame:
            https://datatracker.ietf.org/doc/html/rfc6455#section-5.5.3

        Parameters:
            data: payload containing arbitrary binary data.

        rw   N)
r\   r1   r2   r	   r5   r>   r?   rx   r   r   rn   s     r-   Ú	send_pongzProtocol.send_pong   r‰   r,   c                ó¾  — | j                   t        u rs|t        j                  k7  r`t	        ||«      }|j                  «       }| j                  t        t        |«      «       || _	        | j                  �d| _        t        | _         | j                  t        u r| j                  s| j!                  «        | j#                  «       | _        t'        | j$                  «       y)a?  
        `Fail the WebSocket connection`_.

        .. _Fail the WebSocket connection:
            https://datatracker.ietf.org/doc/html/rfc6455#section-7.1.7

        Parameters:
            code: close code
            reason: close reason

        Raises:
            ProtocolError: If the code isn't valid.
        NT)r5   r1   r   r`   r   rƒ   rx   r   r   rN   rM   rO   r2   rC   r)   rQ   Úsend_eofÚdiscardrV   rW   r„   s        r-   ÚfailzProtocol.fail°  s£   € ð& �:‰:œÑØ”y×1Ñ1Ò1Ü˜d FÓ+�Ø—‘Ó(�Ø—‘¤¤e¨TÓ 2Ô3Ø"'�”ð
 —?‘?Ð.Ø04�DÔ-Ü$�”
ð �9‰9œÑ t§}¢}Ø�M‰MŒOð —l‘l“nˆŒÜˆT�[‰[Õr,   c                ó.   — | j                   g c}| _         |S )a*  
        Fetch events generated from data received from the network.

        Call this method immediately after any of the ``receive_*()`` methods.

        Process resulting events, likely by passing them to the application.

        Returns:
            Events read from the connection.
        )rS   )rY   rS   s     r-   Úevents_receivedzProtocol.events_receivedá  s   € ð #Ÿk™k¨2Ðˆ�”Øˆr,   c                ó.   — | j                   g c}| _         |S )aÉ  
        Obtain data to send to the network.

        Call this method immediately after any of the ``receive_*()``,
        ``send_*()``, or :meth:`fail` methods.

        Write resulting data to the connection.

        The empty bytestring :data:`~websockets.protocol.SEND_EOF` signals
        the end of the data stream. When you receive it, half-close the TCP
        connection.

        Returns:
            Data to write to the connection.

        )rT   )rY   rT   s     r-   Údata_to_sendzProtocol.data_to_sendñ  s   € ð" #Ÿk™k¨2Ðˆ�”Øˆr,   c                ó´   — | j                   t        u ry| j                   t        u ry| j                   t        u ry| j                   t        u sJ ‚| j
                  S )a©  
        Tell if the TCP connection is expected to close soon.

        Call this method immediately after any of the ``receive_*()``,
        ``send_close()``, or :meth:`fail` methods.

        If it returns :obj:`True`, schedule closing the TCP connection after a
        short timeout if the other side hasn't already closed it.

        Returns:
            Whether the TCP connection is expected to close soon.

        FT)r5   r1   r2   r3   r0   rQ   r]   s    r-   Úclose_expectedzProtocol.close_expected  sN   € ðD �:‰:œÑØØ�:‰:œÑ ØØ�:‰:œÑØØ�z‰zœZÑ'Ð'Ð'Ø�}‰}Ðr,   c              #  óè  K  — 	 	 | j                   j                  «       E d{  –—† r2| j                  r| j                  j                  d«       t	        d«      ‚d}| j
                  �2| j                  €| j
                  }n| j
                  | j                  z
  }| j                  �%|€| j                  }nt        || j                  «      }t        j                  | j                   j                  | j                  t        u || j                  ¬«      E d{  –—† }| j                  r| j                  j                  d|«       | j                  |«       �ŒO7 �Œ27 ŒB# t         $ r;}| j#                  t$        j&                  t)        |«      «       || _        Y d}~�nKd}~wt        $ r;}| j#                  t$        j,                  t)        |«      «       || _        Y d}~�n	d}~wt.        $ rJ}| j#                  t$        j0                  |j2                  › d|j4                  › �«       || _        Y d}~n¸d}~wt6        $ rU}|j9                  | j                  «       | j#                  t$        j:                  t)        |«      «       || _        Y d}~n\d}~wt<        $ rM}| j                  j?                  dd¬	«       | j#                  t$        j@                  «       || _        Y d}~nd}~ww xY wd–— tC        d
«      ‚­w)a-  
        Parse incoming data into frames.

        :meth:`receive_data` and :meth:`receive_eof` run this generator
        coroutine until it needs more data or reaches EOF.

        :meth:`parse` never raises an exception. Instead, it sets the
        :attr:`parser_exc` and yields control.

        TNz< EOFzunexpected end of stream)Úmaskr6   rK   z< %sz at position zparser failed)Úexc_infoz"parse() shouldn't step after error)"rR   Úat_eofrB   r7   ÚEOFErrorrF   rH   rG   Úminr   rU   Ú
read_exactrC   r)   rK   Ú
recv_framer   r�   r   ÚPROTOCOL_ERRORÚstrrX   r`   ÚUnicodeDecodeErrorÚINVALID_DATAre   Ústartr
   Úset_current_sizeÚMESSAGE_TOO_BIGÚ	ExceptionÚerrorÚINTERNAL_ERRORÚAssertionError)rY   r6   Úframerj   s       r-   rU   zProtocol.parse2  sH  è ø€ ð=	"ØØ#Ÿ{™{×1Ñ1Ó3×3Ð3Ø—z’zØŸ™×)Ñ)¨'Ô2ô
 #Ð#=Ó>Ð>à�à×(Ñ(Ð4Ø×(Ñ(Ð0Ø#'×#8Ñ#8™à#'×#8Ñ#8¸4×;LÑ;LÑ#L˜à×)Ñ)Ð5ØÐ'Ø#'×#9Ñ#9™ä#& x°×1GÑ1GÓ#H˜ô
 $)§;¡;Ø—K‘K×*Ñ*ØŸ™¤fÐ,Ø%Ø#Ÿ™ô	$÷ �ð —:’:Ø—K‘K×%Ñ% f¨eÔ4à—‘ Ô&ñK Ø3ùð4ùô ò 	"Ø�I‰I”i×.Ñ.´°C³Ô9Ø!ˆD�OŠOûäò 	"Ø�I‰I”i×0Ñ0´#°c³(Ô;Ø!ˆD�OŠOûä!ò 	"Ø�I‰I”i×,Ñ,°·±°¸MÈ#Ï)É)ÈÐ.UÔVØ!ˆD�O‰Oûäò 	"Ø× Ñ  ×!2Ñ!2Ô3Ø�I‰I”i×/Ñ/´°S³Ô:Ø!ˆD�O‰Oûäò 	"Ø�K‰K×Ñ˜o¸ÐÔ=à�I‰I”i×.Ñ.Ô/Ø!ˆD�O‰Oûð		"úó 	ÜÐAÓBÐBùs‘   ‚K2„E ¢E£C1E ÄEÄA E ÅE Å	K Å"0FÆK2ÆK Æ$0GÇK2ÇK Ç&A H+È&K2È+K È7AJÊK2ÊK ÊAKËK2ËK Ë K2c              #  ó0  K  — | j                   t        u xs | j                  t        u | j                  k(  sJ ‚| j
                  j                  «       E d{  –—† s=| j
                  j                  «        | j
                  j                  «       E d{  –—† sŒ=| j                   t        u r"| j                  t        ur| j                  «        t        | _        | j                   t        u r| j                  j                  d«       d–— t        d«      ‚7 Œ¼7 Œ‚­w)zí
        Discard incoming data.

        This coroutine replaces :meth:`parse`:

        - after receiving a close frame, during a normal closure (1.4);
        - after sending a close frame, during an abnormal closure (7.1.7).

        Nzconnection closedz"discard() shouldn't step after EOF)rC   r)   r5   r0   rQ   rR   r™   rŽ   r*   r�   r3   r7   Úinfor¨   r]   s    r-   rŽ   zProtocol.discard�  sÑ   è ø€ ð —	‘	œVÐ#Ò? t§z¡z´ZÐ'?ÀTÇ]Á]ÒSÐSÐSØ"Ÿk™k×0Ñ0Ó2×2Ð2Ø�K‰K×ÑÔ!ð #Ÿk™k×0Ñ0Ó2×2Ñ2ð �9‰9œÑ 4§:¡:´ZÑ#?Ø�M‰MŒOÜˆŒ
Ø�9‰9œÑØ�K‰K×ÑÐ0Ô1ãô ÐAÓBÐBð 3øÐ2ús+   ‚ADÁDÁ;DÂDÂDÂA<DÄDc                óê  — |j                   t        u s|j                   t        u r@| j                  �t	        d«      ‚|j
                  �st        |j                  «      | _        �nô|j                   t        u rV| j                  €t	        d«      ‚|j
                  r	d| _        �n¶| xj                  t        |j                  «      z  c_        �nŒ|j                   t        u r-t        t        |j                  «      }| j                  |«       �nM|j                   t        u r�n9|j                   t        u �rt        j                  |j                  «      | _        | j"                  t$        u r| j&                  €J ‚d| _        | j                  �t	        d«      ‚| j"                  t*        u rL| j                  t        t        |j                  «      «       | j                   | _        d| _        t$        | _        | j,                  t.        u r| j1                  «        | j3                  «       | _        t7        | j4                  «       nt9        d|j                   d›�«      ‚| j:                  j=                  |«       y)	z-
        Process an incoming frame.

        Nr}   rv   Fzincomplete fragmented messageTzunexpected opcode: Ú02x)Úopcoder   r   rH   r   rz   Úlenro   r   r   r   r   rx   r   r   rU   rM   r5   r2   rN   rO   r1   rC   r)   r�   rŽ   rV   rW   r¨   rS   Úappend)rY   r©   Ú
pong_frames      r-   r�   zProtocol.recv_frameŸ  sÐ  € ð
 �<‰<œ4Ñ 5§<¡<´6Ñ#9Ø× Ñ Ð,Ü#Ð$CÓDÐDØ—9“9Ü$'¨¯
©
£O�Ö!à�\‰\œTÑ!Ø× Ñ Ð(Ü#Ð$CÓDÐDØ�yŠyØ$(�Ö!à×!Ò!¤S¨¯©£_Ñ4×!à�\‰\œTÑ!ô œt U§Z¡ZÓ0ˆJØ�O‰O˜JÖ'à�\‰\œTÑ!ñ à�\‰\œUÒ"ô $Ÿk™k¨%¯*©*Ó5ˆDŒOØ�z‰zœWÑ$Ø—‘Ð2Ð2Ð2Ø,1�Ô)à× Ñ Ð,Ü#Ð$CÓDÐDð �z‰zœTÑ!ð
 —‘¤¤e¨U¯Z©ZÓ 8Ô9Ø"&§/¡/�”Ø,0�Ô)Ü$�”
ð �y‰yœFÑ"Ø—‘”ð Ÿ,™,›.ˆDŒKÜ�—‘Õô !Ð#6°u·|±|ÀCÐ6HÐ!IÓJÐJà�‰×Ñ˜5Õ!r,   c                óà   — | j                   r| j                  j                  d|«       | j                  j                  |j	                  | j
                  t        u | j                  ¬«      «       y )Nz> %s)r—   rK   )rB   r7   rT   r°   rƒ   rC   r*   rK   )rY   r©   s     r-   rx   zProtocol.send_frameñ  sS   € Ø�:Š:Ø�K‰K×Ñ˜f eÔ,Ø�‰×ÑØ�O‰OØ—Y‘Y¤&Ð(ØŸ?™?ð ó õ	
r,   c                óº   — | j                   rJ ‚d| _         | j                  r| j                  j                  d«       | j                  j	                  t
        «       y )NTz> EOF)rQ   rB   r7   rT   r°   r!   r]   s    r-   r�   zProtocol.send_eofû  sA   € Ø—=’=Ð Ð ØˆŒØ�:Š:Ø�K‰K×Ñ˜gÔ&Ø�‰×Ñœ8Õ$r,   )
rC   r   r5   r    r6   z*tuple[int | None, int | None] | int | Noner7   zLoggerLike | NoneÚreturnÚNone)r´   r    )r5   r    r´   rµ   )r´   z
int | None)r´   z
str | None)r´   r   )ro   zbytes | bytearrayr´   rµ   )r´   rµ   )ro   r   rz   Úboolr´   rµ   )T)Nrd   )ra   zCloseCode | int | Nonere   rŸ   r´   rµ   )ro   r   r´   rµ   )rd   )ra   zCloseCode | intre   rŸ   r´   rµ   )r´   zlist[Event])r´   zlist[bytes])r´   r¶   )r´   zGenerator[None])r©   r   r´   rµ   )r$   r%   r&   r'   r1   rZ   Úpropertyr5   Úsetterrb   rf   rk   rp   rt   r{   r~   r€   r†   rˆ   r‹   r�   r‘   r“   r•   rU   rŽ   r�   rx   r�   r+   r,   r-   r   r   G   s  „ ñð* Ø?DØ$(ñE1àðE1ð ð	E1ð
 =ðE1ð "ðE1ð 
óE1ðN òó ðð ‡\�\òó ðð
 ò(ó ð(ð$ ò*ó ð*ð$ ò!ó ð!óJó ó*0ô00ô.2ô."óH+ó +ô -óbó ó()óZMCó^Có<N"ód
ô%r,   r   )2Ú
__future__r   Úenumr<   r9   Úcollections.abcr   Ú
exceptionsr   r   r   r	   r
   r   rK   r   Úframesr   r   r   r   r   r   r   r   r   r   Úhttp11r   r   Ústreamsr   Útypingr   r   r   r   Ú__all__ÚEventÚIntEnumr   r)   r*   r    r0   r1   r2   r3   r!   r   r+   r,   r-   ú<module>rÄ      sÍ   ðÝ "ã Û Û Ý %÷÷ õ "÷÷ ÷ ÷ &Ý !ß >Ó >ò€ð 	�(Ñ˜UÑ"€Ø ?ôˆ4�<‰<ô ð 
�‰€Ø	�‰€ô1ˆD�L‰Lô 1ð ×Ñ€
Ø‡z�z€Ø
�-‰-€Ø	�‰€ð €Ø E÷y
%ò y
%r,   