
    h                    D   S SK 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  SSKJr  SS	KJr  SS
KJr  \	" S5      r\	" SSS9r\	" SSS9r " S S\\   \\5      r " S S\\   \\5      r " S S\\   \\   5      r " S S\\   5      r " S S\\   5      r " S S\\   \\   \\   5      r " S S\\5      r " S S \\5      r " S! S"\\5      r\
\\   \4   r \
\\   \4   r!\
\\   \4   r"\
\\   \4   r#\
\\   \4   r$\
\\   \4   r% " S# S$\\   \\5      r&g%)&    )annotations)abstractmethod)Callable)AnyGenericTypeVarUnion   )EndOfStream)TypedAttributeProvider   )AsyncResource)	TaskGroupT_ItemT_coT)	covariantT_contra)contravariantc                  @    \ rS rSrSrSS jrS	S jr\S	S j5       rSr	g)
UnreliableObjectReceiveStream   a  
An interface for receiving objects.

This interface makes no guarantees that the received messages arrive in the order in
which they were sent, or that no messages are missed.

Asynchronously iterating over objects of this type will yield objects matching the
given type parameter.
c                    U $ N selfs    D/var/www/html/env/lib/python3.13/site-packages/anyio/abc/_streams.py	__aiter__'UnreliableObjectReceiveStream.__aiter__           c                h   #     U R                  5       I S h  vN $  N! [         a    [        ef = f7fr   receiver   StopAsyncIterationr   s    r   	__anext__'UnreliableObjectReceiveStream.__anext__!   0     	%''' 	%$$	%    2  2 /2c                   #    g7f)a)  
Receive the next item.

:raises ~anyio.ClosedResourceError: if the receive stream has been explicitly
    closed
:raises ~anyio.EndOfStream: if this stream has been closed from the other end
:raises ~anyio.BrokenResourceError: if this stream has been rendered unusable
    due to external causes
Nr   r   s    r   r$   %UnreliableObjectReceiveStream.receive'           r   N)returnz#UnreliableObjectReceiveStream[T_co])r.   r   
__name__
__module____qualname____firstlineno____doc__r   r&   r   r$   __static_attributes__r   r!   r   r   r      s%    % 	 	r!   r   c                  ,    \ rS rSrSr\SS j5       rSrg)UnreliableObjectSendStream4   z
An interface for sending objects.

This interface makes no guarantees that the messages sent will reach the
recipient(s) in the same order in which they were sent, or at all.
c                   #    g7f)z
Send an item to the peer(s).

:param item: the item to send
:raises ~anyio.ClosedResourceError: if the send stream has been explicitly
    closed
:raises ~anyio.BrokenResourceError: if this stream has been rendered unusable
    due to external causes
Nr   r   items     r   sendUnreliableObjectSendStream.send>   r,   r-   r   N)r;   r   r.   Noner0   r1   r2   r3   r4   r   r<   r5   r   r!   r   r7   r7   4   s     	 	r!   r7   c                      \ rS rSrSrSrg)UnreliableObjectStreamK   zg
A bidirectional message stream which does not guarantee the order or reliability of
message delivery.
r   Nr0   r1   r2   r3   r4   r5   r   r!   r   rA   rA   K   s    r!   rA   c                      \ rS rSrSrSrg)ObjectReceiveStreamT   z
A receive message stream which guarantees that messages are received in the same
order in which they were sent, and that no messages are missed.
r   NrC   r   r!   r   rE   rE   T       r!   rE   c                      \ rS rSrSrSrg)ObjectSendStream[   z
A send message stream which guarantees that messages are delivered in the same order
in which they were sent, without missing any messages in the middle.
r   NrC   r   r!   r   rI   rI   [   rG   r!   rI   c                  ,    \ rS rSrSr\SS j5       rSrg)ObjectStreamb   z`
A bidirectional message stream which guarantees the order and reliability of message
delivery.
c                   #    g7fz
Send an end-of-file indication to the peer.

You should not try to send any further data to this stream after calling this
method. This method is idempotent (does nothing on successive calls).
Nr   r   s    r   send_eofObjectStream.send_eofl   r,   r-   r   Nr.   r>   r0   r1   r2   r3   r4   r   rP   r5   r   r!   r   rL   rL   b   s    

  r!   rL   c                  D    \ rS rSrSrSS jrS	S jr\S
SS jj5       rSr	g)ByteReceiveStreamv   z
An interface for receiving bytes from a single peer.

Iterating this byte stream will yield a byte string of arbitrary length, but no more
than 65536 bytes.
c                    U $ r   r   r   s    r   r   ByteReceiveStream.__aiter__~   r    r!   c                h   #     U R                  5       I S h  vN $  N! [         a    [        ef = f7fr   r#   r   s    r   r&   ByteReceiveStream.__anext__   r(   r)   c                   #    g7f)aR  
Receive at most ``max_bytes`` bytes from the peer.

.. note:: Implementers of this interface should not return an empty
    :class:`bytes` object, and users should ignore them.

:param max_bytes: maximum number of bytes to receive
:return: the received bytes
:raises ~anyio.EndOfStream: if this stream has been closed from the other end
Nr   )r   	max_bytess     r   r$   ByteReceiveStream.receive   r,   r-   r   N)r.   rU   )r.   bytes)i   )r\   intr.   r^   r/   r   r!   r   rU   rU   v   s%    % 
 
r!   rU   c                  ,    \ rS rSrSr\SS j5       rSrg)ByteSendStream   z0An interface for sending bytes to a single peer.c                   #    g7f)zC
Send the given bytes to the peer.

:param item: the bytes to send
Nr   r:   s     r   r<   ByteSendStream.send   r,   r-   r   N)r;   r^   r.   r>   r?   r   r!   r   ra   ra      s    : r!   ra   c                  ,    \ rS rSrSr\SS j5       rSrg)
ByteStream   zA bidirectional byte stream.c                   #    g7frO   r   r   s    r   rP   ByteStream.send_eof   r,   r-   r   NrR   rS   r   r!   r   rf   rf      s    & r!   rf   c                  <    \ rS rSrSr\ S     SS jj5       rSrg)Listener   zBAn interface for objects that let you accept incoming connections.Nc                   #    g7f)a>  
Accept incoming connections as they come in and start tasks to handle them.

:param handler: a callable that will be used to handle each accepted connection
:param task_group: the task group that will be used to start tasks for handling
    each accepted connection (if omitted, an ad-hoc task group will be created)
Nr   )r   handler
task_groups      r   serveListener.serve   r,   r-   r   r   )rn   zCallable[[T_co], Any]ro   zTaskGroup | Noner.   r>   )r0   r1   r2   r3   r4   r   rp   r5   r   r!   r   rk   rk      s2    LMQ	,	:J			 	r!   rk   N)'
__future__r   abcr   collections.abcr   typingr   r   r   r	   _core._exceptionsr   _core._typedattrr   
_resourcesr   _tasksr   r   r   r   r   r7   rA   rE   rI   rL   rU   ra   rf   r^   AnyUnreliableByteReceiveStreamAnyUnreliableByteSendStreamAnyUnreliableByteStreamAnyByteReceiveStreamAnyByteSendStreamAnyByteStreamrk   r   r!   r   <module>r      s   "  $ / / + 5 % 		v&:T2 DM="8 FH}&<.!&)+Ef+M7= 1(; V6"('= >	]$: 	
"N 
 "'!%(*;;"  $$>u$E~$UV  6u =z IJ 079JJK *51>AB l5):56wt}m-C r!   