ó
    ÖÁ“iç  ã                  ó0   • S SK Jr  S SKJr   " S S5      rg)é    )Úannotations)Ú	Generatorc                  óh   • \ rS rSrSrSS jrSS jrSS jrSS jrSS jr	SS jr
SS	 jrSS
 jrSrg)ÚStreamReaderé   z°
Generator-based stream reader.

This class doesn't support concurrent calls to :meth:`read_line`,
:meth:`read_exact`, or :meth:`read_to_eof`. Make sure calls are
serialized.

c                ó0   • [        5       U l        SU l        g )NF)Ú	bytearrayÚbufferÚeof©Úselfs    ÚO/home/mande/repo/quber/.venv/lib/python3.13/site-packages/websockets/streams.pyÚ__init__ÚStreamReader.__init__   s   € Ü“kˆŒØˆ�ó    c              #  ór  #   • SnSn U R                   R                  SU5      S-   nUS:”  a  OR[        U R                   5      nX1:”  a  [        SU SU S35      eU R                  (       a  [        SU S35      eS	v •  Mx  X!:”  a  [        SU SU S35      eU R                   S	U nU R                   S	U2	 U$ 7f)
a=  
Read a LF-terminated line from the stream.

This is a generator-based coroutine.

The return value includes the LF character.

Args:
    m: Maximum number bytes to read; this is a security limit.

Raises:
    EOFError: If the stream ends without a LF.
    RuntimeError: If the stream ends in more than ``m`` bytes.

r   ó   
é   úread ú bytes, expected no more than ú bytesústream ends after z bytes, before end of lineN)r
   ÚfindÚlenÚRuntimeErrorr   ÚEOFError)r   ÚmÚnÚpÚrs        r   Ú	read_lineÚStreamReader.read_line   sÑ   é € ð  ˆØˆØØ—‘× Ñ  ¨Ó*¨QÑ.ˆAØ�1‹uØÜ�D—K‘KÓ ˆAØ‹uÜ" U¨1¨#Ð-KÈAÈ3ÈfÐ#UÓVÐVØ�x�xÜÐ!3°A°3Ð6PÐQÓRÐRÛñ ð ‹5Ü  q cÐ)GÈÀsÈ&ÐQÓRÐRØ�K‰K˜˜ˆOˆØ�K‰K˜˜˜ˆOØˆùs   ‚B5B7c              #  ó:  #   • US:¼  d   e[        U R                  5      U:  aW  U R                  (       a'  [        U R                  5      n[        SU SU S35      eSv •  [        U R                  5      U:  a  MW  U R                  SU nU R                  SU2	 U$ 7f)zÀ
Read a given number of bytes from the stream.

This is a generator-based coroutine.

Args:
    n: How many bytes to read.

Raises:
    EOFError: If the stream ends in less than ``n`` bytes.

r   r   z bytes, expected r   N)r   r
   r   r   )r   r   r   r    s       r   Ú
read_exactÚStreamReader.read_exact6   s�   é € ð �A‹vˆˆvÜ�$—+‘+Ó Ó"Ø�x�xÜ˜Ÿ™Ó$�ÜÐ!3°A°3Ð6GÈÀsÈ&ÐQÓRÐRÛô	 �$—+‘+Ó Õ"ð
 �K‰K˜˜ˆOˆØ�K‰K˜˜˜ˆOØˆùs   ‚A7BÁ; Bc              #  óò   #   • U R                   (       dC  [        U R                  5      nX!:”  a  [        SU SU S35      eSv •  U R                   (       d  MC  U R                  SS nU R                  SS2	 U$ 7f)zÖ
Read all bytes from the stream.

This is a generator-based coroutine.

Args:
    m: Maximum number bytes to read; this is a security limit.

Raises:
    RuntimeError: If the stream ends in more than ``m`` bytes.

r   r   r   N)r   r   r
   r   )r   r   r   r    s       r   Úread_to_eofÚStreamReader.read_to_eofM   si   é € ð —(—(Ü�D—K‘KÓ ˆAØ‹uÜ" U¨1¨#Ð-KÈAÈ3ÈfÐ#UÓVÐVÛð	 —(—(‘(ð
 �K‰K™ˆNˆØ�K‰KšˆNØˆùs   ‚AA7Á A7c              #  ó`   #   •  U R                   (       a  gU R                  (       a  gSv •  M*  7f)za
Tell whether the stream has ended and all data was read.

This is a generator-based coroutine.

TFN©r
   r   r   s    r   Úat_eofÚStreamReader.at_eofc   s(   é € ð Ø�{�{ØØ�x�xØó ñ ùs   ‚,.c                óf   • U R                   (       a  [        S5      eU =R                  U-  sl        g)z¨
Write data to the stream.

:meth:`feed_data` cannot be called after :meth:`feed_eof`.

Args:
    data: Data to write.

Raises:
    EOFError: If the stream has ended.

ústream endedN)r   r   r
   )r   Údatas     r   Ú	feed_dataÚStreamReader.feed_datas   s$   € ð �8�8Ü˜>Ó*Ð*Ø�Š�tÑŽr   c                óJ   • U R                   (       a  [        S5      eSU l         g)zu
End the stream.

:meth:`feed_eof` cannot be called more than once.

Raises:
    EOFError: If the stream has ended.

r.   TN)r   r   r   s    r   Úfeed_eofÚStreamReader.feed_eof„   s   € ð �8�8Ü˜>Ó*Ð*Øˆ�r   c                ó"   • U R                   SS2	 g)z7
Discard all buffered data, but don't end the stream.

N)r
   r   s    r   ÚdiscardÚStreamReader.discard’   s   € ð
 �K‰Kš‰Nr   r*   N)ÚreturnÚNone)r   Úintr8   ú Generator[None, None, bytearray])r   r:   r8   r;   )r8   zGenerator[None, None, bool])r/   zbytes | bytearrayr8   r9   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r!   r$   r'   r+   r0   r3   r6   Ú__static_attributes__© r   r   r   r      s0   † ñôô ôDô.ô,ô ô"÷r   r   N)Ú
__future__r   Úcollections.abcr   r   rB   r   r   Ú<module>rE      s   ðÝ "å %÷Qò Qr   