
    vKg؍                       S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SK	J
r
JrJr  S SKJr  S SKJr  SSKJrJrJrJr  SSKJrJrJrJrJr  SS	KJrJr  SS
KJ r J!r!J"r"J#r#J$r$  SSKJ%r%J&r&J'r'  SSK(J)r)  SSK*J+r+  S/r, " S S5      r-g)    )annotationsN)IterableIteratorMapping)TracebackType)Any   )ConcurrencyErrorConnectionClosedConnectionClosedOKProtocolError)DATA_OPCODES	BytesLike	CloseCodeFrameOpcode)RequestResponse)CLOSEDOPENEventProtocolState)Data
LoggerLikeSubprotocol   )	Assembler)Deadline
Connectionc                     \ rS rSrSrSrSSS.         S"S jjr\S#S j5       r\S#S	 j5       r	\S$S
 j5       r
\S%S j5       r\S&S j5       r\S'S j5       rS(S jr        S)S jrS*S jrS+S,S jjrS-S.S jjr S-     S/S jjr\R*                  S4S0S jjrS-S1S jjrS2S3S jjrS4S jrS5S jrS6S jr\R:                  \S.   S7S jj5       rS6S jr S8S jr!S6S  jr"S!r#g)9r       a#  
:mod:`threading` implementation of a WebSocket connection.

:class:`Connection` provides APIs shared between WebSocket servers and
clients.

You shouldn't use it directly. Instead, use
:class:`~websockets.sync.client.ClientConnection` or
:class:`~websockets.sync.server.ServerConnection`.

i   
      )close_timeout	max_queuec               L   Xl         X l        X0l        [        U[        5      (       d  Uc  US 4nX@l        [        R                  " U R                  R                  SU 05      U R                  l        U R                  R                  U l	         U R                  R                  U l         U R                  R                  U l
        S U l         S U l         [        R                  " 5       U l        [        R                  " 5       U l        [#        U R
                  U R                   R$                  U R                   R&                  S.6U l        SU l        S U l        0 U l        S U l        [        R2                  " U R4                  SS9U l        U R6                  R9                  5         g )N	websocket)pauseresumeFT)targetdaemon)socketprotocolr%   
isinstanceintr&   loggingLoggerAdapterloggeriddebugrequestresponse	threadingLockprotocol_mutexrecv_flow_controlr   acquirereleaserecv_messagessend_in_progressclose_deadlineping_waitersrecv_excThreadrecv_eventsrecv_events_threadstart)selfr-   r.   r%   r&   s        Z/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/websockets/sync/connection.py__init__Connection.__init__.   sf     *i%%):"D)I"  '44MM  $ 
 "]]--B"&--"6"6)]]((
 (,()-) (nn. "+!1 '^^((00))11
 !& 04 ;= /3
 #,"2"2###
 	%%'    c                6    U R                   R                  5       $ )z
Local address of the connection.

For IPv4 connections, this is a ``(host, port)`` tuple.

The format of the address depends on the address family.
See :meth:`~socket.socket.getsockname`.

)r-   getsocknamerG   s    rH   local_addressConnection.local_addressu        {{&&((rK   c                6    U R                   R                  5       $ )z
Remote address of the connection.

For IPv4 connections, this is a ``(host, port)`` tuple.

The format of the address depends on the address family.
See :meth:`~socket.socket.getpeername`.

)r-   getpeernamerN   s    rH   remote_addressConnection.remote_address   rQ   rK   c                .    U R                   R                  $ )a  
State of the WebSocket connection, defined in :rfc:`6455`.

This attribute is provided for completeness. Typical applications
shouldn't check its value. Instead, they should call :meth:`~recv` or
:meth:`send` and handle :exc:`~websockets.exceptions.ConnectionClosed`
exceptions.

)r.   staterN   s    rH   rW   Connection.state   s     }}"""rK   c                .    U R                   R                  $ )zf
Subprotocol negotiated during the opening handshake.

:obj:`None` if no subprotocol was negotiated.

)r.   subprotocolrN   s    rH   rZ   Connection.subprotocol   s     }}(((rK   c                .    U R                   R                  $ a  
State of the WebSocket connection, defined in :rfc:`6455`.

This attribute is provided for completeness. Typical applications
shouldn't check its value. Instead, they should inspect attributes
of :exc:`~websockets.exceptions.ConnectionClosed` exceptions.

)r.   
close_coderN   s    rH   r^   Connection.close_code   s     }}'''rK   c                .    U R                   R                  $ r]   )r.   close_reasonrN   s    rH   ra   Connection.close_reason   s     }})))rK   c                    U $ N rN   s    rH   	__enter__Connection.__enter__   s    rK   c                j    Uc  U R                  5         g U R                  [        R                  5        g rd   )closer   INTERNAL_ERROR)rG   exc_type	exc_value	tracebacks       rH   __exit__Connection.__exit__   s%     JJLJJy//0rK   c              #  V   #      U R                  5       v   M  ! [         a     gf = f7f)a  
Iterate on incoming messages.

The iterator calls :meth:`recv` and yields messages in an infinite loop.

It exits when the connection is closed normally. It raises a
:exc:`~websockets.exceptions.ConnectionClosedError` exception after a
protocol error or a network failure.

N)recvr   rN   s    rH   __iter__Connection.__iter__   s/     	iik! ! 		s   ) 
&)&)Nc                     U R                   R                  X5      $ ! [         a     O[         a    [        S5      Se[         a{  nU R                  5          U R                  R                  [        R                  UR                   SUR                   35        SSS5         SnAO! , (       d  f        SnAO= fSnAff = fU R                  R                  5         U R                  R                  U R                  e)ar  
Receive the next message.

When the connection is closed, :meth:`recv` raises
:exc:`~websockets.exceptions.ConnectionClosed`. Specifically, it raises
:exc:`~websockets.exceptions.ConnectionClosedOK` after a normal closure
and :exc:`~websockets.exceptions.ConnectionClosedError` after a protocol
error or a network failure. This is how you detect the end of the
message stream.

If ``timeout`` is :obj:`None`, block until a message is received. If
``timeout`` is set and no message is received within ``timeout``
seconds, raise :exc:`TimeoutError`. Set ``timeout`` to ``0`` to check if
a message was already received.

If the message is fragmented, wait until all fragments are received,
reassemble them, and return the whole message.

Args:
    timeout: Timeout for receiving a message in seconds.
    decode: Set this flag to override the default behavior of returning
        :class:`str` or :class:`bytes`. See below for details.

Returns:
    A string (:class:`str`) for a Text_ frame or a bytestring
    (:class:`bytes`) for a Binary_ frame.

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

    You may override this behavior with the ``decode`` argument:

    * Set ``decode=False`` to disable UTF-8 decoding of Text_ frames and
      return a bytestring (:class:`bytes`). This improves performance
      when decoding isn't needed, for example if the message contains
      JSON and you're using a JSON library that expects a bytestring.
    * Set ``decode=True`` to force UTF-8 decoding of Binary_ frames
      and return a string (:class:`str`). This may be useful for
      servers that send binary frames instead of text frames.

Raises:
    ConnectionClosed: When the connection is closed.
    ConcurrencyError: If two threads call :meth:`recv` or
        :meth:`recv_streaming` concurrently.

zOcannot call recv while another thread is already running recv or recv_streamingN at position )r>   getEOFErrorr
   UnicodeDecodeErrorsend_contextr.   failr   INVALID_DATAreasonrF   rE   join	close_excrB   )rG   timeoutdecodeexcs       rH   rq   Connection.recv   s    ^	%%))':: 	 	"<  " 	""$""**zzl-		{; %$$$	 	$$&mm%%4==8s9    
CCB=AB(B=(
B:	2B=:B==Cc              #    #     U R                   R                  U5       Sh  vN   g N! [         a     O[         a    [        S5      Se[         a{  nU R                  5          U R                  R                  [        R                  UR                   SUR                   35        SSS5         SnAO! , (       d  f        SnAO= fSnAff = fU R                  R                  5         U R                  R                  U R                  e7f)a  
Receive the next message frame by frame.

This method is designed for receiving fragmented messages. It returns an
iterator that yields each fragment as it is received. This iterator must
be fully consumed. Else, future calls to :meth:`recv` or
:meth:`recv_streaming` will raise
:exc:`~websockets.exceptions.ConcurrencyError`, making the connection
unusable.

:meth:`recv_streaming` raises the same exceptions as :meth:`recv`.

Args:
    decode: Set this flag to override the default behavior of returning
        :class:`str` or :class:`bytes`. See below for details.

Returns:
    An iterator of strings (:class:`str`) for a Text_ frame or
    bytestrings (:class:`bytes`) for a Binary_ frame.

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

    You may override this behavior with the ``decode`` argument:

    * Set ``decode=False`` to disable UTF-8 decoding of Text_ frames
      and return bytestrings (:class:`bytes`). This may be useful to
      optimize performance when decoding isn't needed.
    * Set ``decode=True`` to force UTF-8 decoding of Binary_ frames
      and return strings (:class:`str`). This is useful for servers
      that send binary frames instead of text frames.

Raises:
    ConnectionClosed: When the connection is closed.
    ConcurrencyError: If two threads call :meth:`recv` or
        :meth:`recv_streaming` concurrently.

NzYcannot call recv_streaming while another thread is already running recv or recv_streamingru   )r>   get_iterrw   r
   rx   ry   r.   rz   r   r{   r|   rF   rE   r}   r~   rB   )rG   r   r   s      rH   recv_streamingConnection.recv_streaming$  s     N	))226::: ; 	 	"<  " 	""$""**zzl-		{; %$$$	 	$$&mm%%4==8sf   D* (* D* 
CDCC
$AB5(C
0D5
C	?C
DC

C>Dc                	   [        U[        5      (       a  U R                  5          U R                  (       a  [	        S5      eUSL a*  U R
                  R                  UR                  5       5        O)U R
                  R                  UR                  5       5        SSS5        g[        U[        5      (       ar  U R                  5          U R                  (       a  [	        S5      eUSL a  U R
                  R                  U5        OU R
                  R                  U5        SSS5        g[        U[        5      (       a  [        S5      e[        U[        5      (       Ga~  [        U5      n [        U5      n [        U[        5      (       a  U R                  5          U R                  (       a  [	        S5      eSU l        USL a)  U R
                  R                  UR                  5       SS9  O(U R
                  R                  UR                  5       SS9  SSS5        SnO[        U[        5      (       ay  U R                  5          U R                  (       a  [	        S5      eSU l        USL a  U R
                  R                  USS9  OU R
                  R                  USS9  SSS5        SnO[        S5      eU H  n[        U[        5      (       a]  U(       aV  U R                  5          U R                  (       d   eU R
                  R!                  UR                  5       SS9  SSS5        Mu  [        U[        5      (       aO  U(       dH  U R                  5          U R                  (       d   eU R
                  R!                  USS9  SSS5        M  [        S5      e   U R                  5          U R
                  R!                  S	SS9  SU l        SSS5        g[        S5      e! , (       d  f       g= f! , (       d  f       g= f! [         a     gf = f! , (       d  f       GN= f! , (       d  f       GN= f! , (       d  f       GM  = f! , (       d  f       GM  = f! , (       d  f       g= f! [         a    e ["         aV    U R                  5          U R
                  R%                  [&        R(                  S
5        SSS5        e ! , (       d  f       e = ff = f)a  
Send a message.

A string (:class:`str`) is sent as a Text_ frame. A bytestring or
bytes-like object (:class:`bytes`, :class:`bytearray`, or
:class:`memoryview`) is sent as a Binary_ frame.

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

You may override this behavior with the ``text`` argument:

* Set ``text=True`` to send a bytestring or bytes-like object
  (:class:`bytes`, :class:`bytearray`, or :class:`memoryview`) as a
  Text_ frame. This improves performance when the message is already
  UTF-8 encoded, for example if the message contains JSON and you're
  using a JSON library that produces a bytestring.
* Set ``text=False`` to send a string (:class:`str`) in a Binary_
  frame. This may be useful for servers that expect binary frames
  instead of text frames.

:meth:`send` also accepts an iterable of strings, bytestrings, or
bytes-like objects to enable fragmentation_. Each item is treated as a
message fragment and sent in its own frame. All items must be of the
same type, or else :meth:`send` will raise a :exc:`TypeError` and the
connection will be closed.

.. _fragmentation: https://datatracker.ietf.org/doc/html/rfc6455#section-5.4

:meth:`send` rejects dict-like objects because this is often an error.
(If you really want to send the keys of a dict-like object as fragments,
call its :meth:`~dict.keys` method and pass the result to :meth:`send`.)

When the connection is closed, :meth:`send` raises
:exc:`~websockets.exceptions.ConnectionClosed`. Specifically, it
raises :exc:`~websockets.exceptions.ConnectionClosedOK` after a normal
connection closure and
:exc:`~websockets.exceptions.ConnectionClosedError` after a protocol
error or a network failure.

Args:
    message: Message to send.

Raises:
    ConnectionClosed: When the connection is closed.
    ConcurrencyError: If the connection is sending a fragmented message.
    TypeError: If ``message`` doesn't have a supported type.

z=cannot call send while another thread is already running sendFNTzdata is a dict-like object)finz'data iterable must contain bytes or strz(data iterable must contain uniform typesrK   zerror in fragmented messagez$data must be str, bytes, or iterable)r/   strry   r?   r
   r.   send_binaryencode	send_textr   r   	TypeErrorr   iternextStopIterationsend_continuation	Exceptionrz   r   rj   )rG   messagetextchunkschunkr   s         rH   sendConnection.sendb  s   r gs##""$((*2  5=MM--gnn.>?MM++GNN,<= %$ ++""$((*2  4<MM++G4MM--g6 %$ ))899 **']FV>eS))**,00"2!:#  15-5= MM55elln%5P MM33ELLN3N - "Fy11**,00"2!:#  15-4< MM33Eu3E MM55e5G - #F#$MNN $E!%--&!..0#'#8#88#8 MM;;ELLNPU;V 10 $E955f!..0#'#8#88#8 MM;;Eu;M 10 ((RSS $ &&(MM33CT3B,1D) )(( BCCM %$ %$, !  -, -,$ 10 10 )( $    &&(MM&&!005 )
  )(
 s   A5O*	AO;-P 9%Q7 A:P0Q7 AP.&AQ7 -<Q )6Q7 .Q'Q7 4"Q&Q7 *
O8;
P	
PP
P+&Q7 .
P=8Q7  
Q	
	Q7 
Q#		Q7 &
Q40Q7 4Q7 7$S!+S	S!
S	S! c                (    U R                  5          U R                  (       a+  U R                  R                  [        R
                  S5        OU R                  R                  X5        SSS5        g! , (       d  f       g= f! [         a     gf = f)ac  
Perform the closing handshake.

:meth:`close` waits for the other end to complete the handshake, for the
TCP connection to terminate, and for all incoming messages to be read
with :meth:`recv`.

:meth:`close` is idempotent: it doesn't do anything once the
connection is closed.

Args:
    code: WebSocket close code.
    reason: WebSocket close reason.

zclose during fragmented messageN)ry   r?   r.   rz   r   rj   
send_closer   )rG   coder|   s      rH   ri   Connection.close  sq     	 ""$((MM&&!009
 MM,,T: %$$   	 	s/   B AA3*B 3
B=B B 
BBc                \   [        U[        5      (       a  [        U5      nO4[        U[        5      (       a  UR	                  5       nOUb  [        S5      eU R                  5          XR                  ;   a  [        S5      eUb  XR                  ;   aA  [        R                  " S[        R                  " S5      5      nUc  M0  XR                  ;   a  MA  [        R                  " 5       nX R                  U'   U R                  R!                  U5        UsSSS5        $ ! , (       d  f       g= f)a  
Send a Ping_.

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

A ping may serve as a keepalive or as a check that the remote endpoint
received all messages up to this point

Args:
    data: Payload of the ping. A :class:`str` will be encoded to UTF-8.
        If ``data`` is :obj:`None`, the payload is four random bytes.

Returns:
    An event that will be set when the corresponding pong is received.
    You can ignore it if you don't intend to wait.

    ::

        pong_event = ws.ping()
        pong_event.wait()  # only if you want to wait for the pong

Raises:
    ConnectionClosed: When the connection is closed.
    ConcurrencyError: If another ping was sent with the same data and
        the corresponding pong wasn't received yet.

Ndata must be str or bytes-likez-already waiting for a pong with the same dataz!I    )r/   r   bytesr   r   r   ry   rA   r
   structpackrandomgetrandbitsr8   r   r.   	send_ping)rG   datapong_waiters      rH   pingConnection.ping$  s    8 dI&&;Dc"";;=D<== (((&'VWW ,$*;*;";{{4););B)?@ ,$*;*;"; $//+K&1d#MM##D) !  s   &ADD?D
D+c                2   [        U[        5      (       a  [        U5      nO1[        U[        5      (       a  UR	                  5       nO[        S5      eU R                  5          U R                  R                  U5        SSS5        g! , (       d  f       g= f)a"  
Send a Pong_.

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

An unsolicited pong may serve as a unidirectional heartbeat.

Args:
    data: Payload of the pong. A :class:`str` will be encoded to UTF-8.

Raises:
    ConnectionClosed: When the connection is closed.

r   N)	r/   r   r   r   r   r   ry   r.   	send_pongrG   r   s     rH   pongConnection.pongU  sh     dI&&;Dc"";;=D<== MM##D) !  s   #B
Bc                   [        U[        5      (       d   eUR                  [        ;   a  U R                  R                  U5        UR                  [        R                  L a%  U R                  [        UR                  5      5        gg)z`
Process one incoming event.

This method is overridden in subclasses to handle the handshake.

N)r/   r   opcoder   r>   putr   PONGacknowledge_pingsr   r   )rG   events     rH   process_eventConnection.process_eventp  sc     %''''<<<'""5)<<6;;&""5#45 'rK   c                b   U R                      XR                  ;  a
   SSS5        gSn/ nU R                  R                  5        H-  u  p$UR                  U5        UR	                  5         X!:X  d  M-    O   [        S5      eU H  nU R                  U	 M     SSS5        g! , (       d  f       g= f)z+
Acknowledge pings when receiving a pong.

Nz!solicited pong not found in pings)r:   rA   itemsappendsetAssertionError)rG   r   ping_idping_idsr   s        rH   r   Connection.acknowledge_pings~  s    
   ,,, !  GH!%!2!2!8!8!:(
?	 "; %%HII#%%g. $! !  s   B AB 2%B  
B.c                      U R                      U R                  b3  U R                  R                  U R                  R	                  5       5        SSS5        U R                  R                  U R                  5      nUS:X  a  OU R                     U R                  R                  U5        U R                  R                  5       n U R                  5         U R                  R!                  5       (       a'  U R                  c  [#        U R$                  5      U l        SSS5        W H  nU R'                  U5        M     GM@  U R                     U R                  R)                  5         U R                  R                  5       nU R                  5         SSS5        W H  nU R'                  U5        M     U R-                  5         g! , (       d  f       GN}= f! [         ao  nU R                  (       a  U R                  R                  SSS9  U R                     U R                  U5        SSS5        O! , (       d  f       O= f SnAGM
  SnAff = f! [         aP  nU R                  (       a  U R                  R                  SSS9  U R                  U5         SnASSS5        GMg  SnAff = f! , (       d  f       GN= f! , (       d  f       GN7= f! [         ab  nU R                  R+                  SSS9  U R                     U R                  U5        SSS5         SnAGMq  ! , (       d  f        SnAGN= fSnAff = f! U R-                  5         f = f)z
Read incoming data from the socket and process events.

Run this method in a thread as long as the connection is alive.

``recv_events()`` exits immediately when the ``self.socket`` is closed.

TNz! error while receiving dataexc_inforK   ! error while sending dataunexpected internal error)r;   r@   r-   
settimeoutr   rq   recv_bufsizer   r5   r3   r:   set_recv_excr.   receive_dataevents_received	send_dataclose_expectedr   r%   r   receive_eoferrorclose_socket)rG   r   r   eventsr   s        rH   rD   Connection.recv_events  s   ^	 //..: KK2243F3F3N3N3PQ 0  ;;++D,=,=>D 3; ((MM..t4 "]]::<F( }}3355  ..62:4;M;M2ND/7 )H $E&&u- $y D $$))+ 668   %   ""5)   w 0/ ! zz)):%) *  ,,))#. -,,8 % :: KK-- <)- .  ))#.+ )( )(T %$(  	'KK9DI$$!!#& %$$$$	' s  K G AG-G >K 6J2IAJ21K AK"K 
GG 
I#7IH5,	I5
I	?IK IK 
J/<J*J2K *J//J22
K<K 
KK 
M &L=L'L= M '
L:	1L=4M :L==MM M)expected_statec             #    #    SnSnSnU R                      U R                  R                  UL aa   Sv   U R                  R                  5       (       a+  SnU R                  b   e[        U R                  5      U l         U R                  5         OSnSnSSS5        U(       a  U R                  c  U R                  nOU R                  R                  SS9nU R                  R!                  U5        U R                  R#                  5       (       a8  Ub   e[%        S5      nSnU R                      U R'                  U5        SSS5        U(       aA  U R)                  5         U R                  R!                  5         U R                  R*                  Ueg! [         a<  nU R                  (       a  U R                  R                  SSS9  SnSnUn SnAGN>SnAff = f! [        [        4 a    e [         a+  nU R                  R                  SSS9  SnSnUn SnAGNSnAff = f! , (       d  f       GN= f! , (       d  f       N= f7f)	a;  
Create a context for writing to the connection from user code.

On entry, :meth:`send_context` acquires the connection lock and checks
that the connection is open; on exit, it writes outgoing data to the
socket::

    with self.send_context():
        self.protocol.send_text(message.encode())

When the connection isn't open on entry, when the connection is expected
to close on exit, or when an unexpected error happens, terminating the
connection, :meth:`send_context` waits until the connection is closed
then raises :exc:`~websockets.exceptions.ConnectionClosed`.

FNTr   r   r   )raise_if_elapsedz"timed out while closing connection)r:   r.   rW   r   r@   r   r%   r   r   r5   r3   r   r
   r   r   rE   r}   is_aliveTimeoutErrorr   r   r~   )rG   r   wait_for_closeraise_close_excoriginal_excr   r   s          rH   ry   Connection.send_context  s    . -1   }}""n4%+ }}3355)-  $22:::.6t7I7I.J++(  "&"&] !j ""*,, --55u5M##((1&&//11 $++++,PQ #'((%%l3 )
 ##((*--))|;	 Y % 
+:: KK-- <)- .  */*.'*
+3 &'78   'KK%%&AD%Q &+N&*O#&L' ! J )(s   IH"GA
H"?FH"BI.H4 AI
G1GH"GH"H4 HH"HH""
H1,I4
I>Ic                   U R                   R                  5       (       d   eU R                  R                  5        H  nU(       a]  U R                  b3  U R
                  R                  U R                  R                  5       5        U R
                  R                  U5        Mg   U R
                  R                  [
        R                  5        M     g! [         a     M  f = f)zz
Send outgoing data.

This method requires holding protocol_mutex.

Raises:
    OSError: When a socket operations fails.

N)r:   lockedr.   data_to_sendr@   r-   r   r   sendallshutdownSHUT_WROSErrorr   s     rH   r   Connection.send_datam  s     ""))++++MM..0D&&2KK**4+>+>+F+F+HI##D)KK((8 1  s   $)C
C C c                n    U R                   R                  5       (       d   eU R                  c  Xl        gg)zN
Set recv_exc, if not set yet.

This method requires holding protocol_mutex.

N)r:   r   rB   )rG   r   s     rH   r   Connection.set_recv_exc  s3     ""))++++== M !rK   c                R    U R                   R                  [         R                  5        U R                   R	                  5         U R
                  R                  5         U R
                  R                  [        L d   eU R                  R	                  5         g! [         a     Nzf = f)z
Shutdown and close socket. Close message assembler.

Calling close_socket() guarantees that recv_events() terminates. Indeed,
recv_events() may block only on socket.recv() or on recv_messages.put().

N)
r-   r   	SHUT_RDWRr   ri   r.   r   rW   r   r>   rN   s    rH   r   Connection.close_socket  s    	KK  !1!12 	 	!!#}}""f,,, 	  "  		s   )B 
B&%B&)r@   r%   r5   r4   r3   r&   rA   r.   r:   rE   rB   r;   r>   r6   r7   r?   r-   )
r-   zsocket.socketr.   r   r%   float | Noner&   z*int | None | tuple[int | None, int | None]returnNone)r   r   )r   r   )r   zSubprotocol | None)r   z
int | None)r   z
str | None)r   r    )rk   ztype[BaseException] | Nonerl   BaseException | Nonerm   zTracebackType | Noner   r   )r   Iterator[Data])NN)r   r   r   bool | Noner   r   rd   )r   r   r   r   )r   zData | Iterable[Data]r   r   r   r   )r   r0   r|   r   r   r   )r   zData | Noner   zthreading.Event)rK   )r   r   r   r   )r   r   r   r   )r   r   r   r   )r   r   )r   r   r   zIterator[None])r   r   r   r   )$__name__
__module____qualname____firstlineno____doc__r   rI   propertyrO   rT   rW   rZ   r^   ra   rf   rn   rr   rq   r   r   r   NORMAL_CLOSUREri   r   r   r   r   rD   
contextlibcontextmanagerr   ry   r   r   r   __static_attributes__re   rK   rH   r    r       s   
 L ')@BC(C( C(
 $C( >C( 
C(N 
) 
) 
) 
) 
# 
# ) ) 	( 	( 	* 	*	1,	1 (	1 (		1
 
	1"C9J<9B !`D&`D `D 
	`DD !* 8 8 @/b*66/0g R  !%k< k< 
	k< k<Z,	 #rK   ).
__future__r   r   r1   r   r-   r   r8   uuidcollections.abcr   r   r   typesr   typingr   
exceptionsr
   r   r   r   framesr   r   r   r   r   http11r   r   r.   r   r   r   r   r   r   r   r   messagesr   utilsr   __all__r    re   rK   rH   <module>r     sf    "        7 7    G F & ; ; 2 2   .D# D#rK   