]L iLddlmZddlZddlmcmZddlm Z m Z m Z ddl m Z ddlmZmZmZddlmZmZmZmZmZmZmZmZedZed Ze d Gd d eZe d GddeeeeZe d GddeeeeZy)) annotationsN)CallableMappingSequence) dataclass)AnyGenericTypeVar)ByteReceiveStreamByteSendStream ByteStreamListenerObjectReceiveStreamObjectSendStream ObjectStream TaskGroupT_ItemT_StreamF)eqcZeZdZUdZded<ded<d d dZddZddZdd Ze dd Z y )StapledByteStreamaV Combines two byte streams into a single, bidirectional byte stream. Extra attributes will be provided from both streams, with the receive stream providing the values in case of a conflict. :param ByteSendStream send_stream: the sending byte stream :param ByteReceiveStream receive_stream: the receiving byte stream r send_streamr receive_streamcTK|jj|d{S7wNrreceive)self max_bytess [/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/anyio/streams/stapled.pyrzStapledByteStream.receive%s#((00;;;;s (&(cVK|jj|d{y7wrrsendritems r!r$zStapledByteStream.send( ##D))) )')cTK|jjd{y7wrraclosers r!send_eofzStapledByteStream.send_eof+%%''' (&(cK|jjd{|jjd{y7'7wrrr+rr,s r!r+zStapledByteStream.aclose.?%%'''!!((*** (*!A A!A A A  A c^i|jj|jjSrrextra_attributesrr,s r!r6z"StapledByteStream.extra_attributes24 // !!22  N)i)r intreturnbytes)r&r;r:Noner:r<r:zMapping[Any, Callable[[], Any]] __name__ __module__ __qualname____doc____annotations__rr$r-r+propertyr6r8r!rrs= %%<*(+  r8rcXeZdZUdZded<ded<d dZd dZddZdd Ze dd Z y )StapledObjectStreamab Combines two object streams into a single, bidirectional object stream. Extra attributes will be provided from both streams, with the receive stream providing the values in case of a conflict. :param ObjectSendStream send_stream: the sending object stream :param ObjectReceiveStream receive_stream: the receiving object stream zObjectSendStream[T_Item]rzObjectReceiveStream[T_Item]rcRK|jjd{S7wrrr,s r!rzStapledObjectStream.receiveIs!((002222s '%'cVK|jj|d{y7wrr#r%s r!r$zStapledObjectStream.sendLr'r(cTK|jjd{y7wrr*r,s r!r-zStapledObjectStream.send_eofOr.r/cK|jjd{|jjd{y7'7wrr1r,s r!r+zStapledObjectStream.acloseRr2r3c^i|jj|jjSrr5r,s r!r6z$StapledObjectStream.extra_attributesVr7r8N)r:r)r&rr:r<r=r>r?rFr8r!rHrH:s=*)//3*(+  r8rHcTeZdZUdZded<d dZ d d dZd dZed dZ y) MultiListenera Combines multiple listeners into one, serving connections from all of them at once. Any MultiListeners in the given collection of listeners will have their listeners moved into this one. Extra attributes are provided from each listener, with each successive listener overriding any conflicting attributes from the previous one. :param listeners: listeners to serve :type listeners: Sequence[Listener[T_Stream]] zSequence[Listener[T_Stream]] listenerscg}|jD]N}t|tr+|j|j|jdd=>|j |P||_yr)rP isinstancerOextendappend)rrPlisteners r! __post_init__zMultiListener.__post_init__os].0  +H(M2  !3!34&&q)  *  +#r8NcKddlm}|4d{}|jD]}|j|j||!dddd{y7C7#1d{7swYyxYww)Nr )create_task_group)rXrP start_soonserve)rhandler task_grouprXtgrUs r!r[zMultiListener.servezst )$& C C" NN C hnngzB C C C C C C C CsDA1AA1/A A1AA1A1A."A% #A.*A1cbK|jD]}|jd{y7wr)rPr+)rrUs r!r+zMultiListener.acloses, $H//# # # $ #s #/-/cbi}|jD]}|j|j|Sr)rPupdater6)r attributesrUs r!r6zMultiListener.extra_attributess6  9H   h77 8 9r8r=r)r\zCallable[[T_Stream], Any]r]zTaskGroup | Noner:r<r>) r@rArBrCrDrVr[r+rEr6rFr8r!rOrO^sU ,+ #RVC0C>NC C$r8rO) __future__rbuiltins @py_builtins_pytest.assertion.rewrite assertionrewrite @pytest_arcollections.abcrrr dataclassesrtypingrr r abcr r rrrrrrrrrrHrOrFr8r!rns"77!((      :  e     F e  '&/<+?    F e.GH%x'9..r8