gAocsOoOOFoOOFoOOFoOOFoOOFoXXO1%^XO* oOOFEoOOFE o OOFE o OO FE o OO FE o OO F EoOO FEoO oOOX,OggoOOX,OggoXXO1%^OOX,OggoOOX,OggoOOX M,1oOOXX M,1oOO1oOO1od)) StreamReader StreamWriterStreamReaderProtocolopen_connection start_serverNZAF_UNIX)open_unix_connectionstart_unix_server) coroutines)events) exceptions)format_helpers) protocols)logger)sleepilimitcs[ WM1kWT$O5kWTTO5j QMQ 0OgT0,Q@2DOesI rmgW QP TT1kTX0!I3c)aA wrapper for create_connection() returning a (reader, writer) pair. The reader returned is a StreamReader instance; the writer is a StreamWriter instance. The arguments are all the usual arguments to create_connection() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader). (If you want to customize the StreamReader and/or StreamReaderProtocol classes, just copy the code -- there's really nothing special here except some convenience.) rlooprc:P!Nprotocol(/usr/lib64/python3.14/asyncio/streams.pyZ!open_connection..1sN)r get_running_looprrZcreate_connectionr) hostportrkwdsrreader transport_writerrs @rrrsi&  " " $D  1F#F6H//$.(,..LI )Xv .A A% A# A%cs[[[ WM1jQQQ0OgkPMTQQ0,Q@2DOesI !I3c)aVStart a socket server, call back for each client connected. The first parameter, `client_connected_cb`, takes two parameters: client_reader, client_writer. client_reader is a StreamReader object, while client_writer is a StreamWriter object. This parameter can either be a plain callback function or a coroutine; if it is a coroutine, it will be automatically converted into a Task. The rest of the arguments are all the usual arguments to loop.create_server() except protocol_factory; most common are positional host and port, with various optional keyword arguments following. The return value is the same as loop.create_server(). Additional optional keyword argument is limit (to set the buffer limit passed to the StreamReader). The return value is the same as loop.create_server(), i.e. a Server object which can be used to stop the service. c>:WPPO5kWQPPO5kQ!Nrrrrr!rclient_connected_cbrr rfactoryZstart_server..factoryNs&E5'0C-13rN)r rZ create_server)r*rrrr r,rs` ` @rrr6s;,  " " $D ##G4@4@ @@ @s5A?Acs[ WM1kWTO5kWTCO5jQMQ0OgQ0,Q@2DOesI rmVW QPTC1kTG0!I3c)z@Similar to `open_connection` but works with UNIX Domain Sockets.rrcrrrrrrrZ&open_unix_connection..bsHrN)r rrrZcreate_unix_connectionr) pathrr rr!r"r#r$rs @rrrZsi&&(E5':!88 d,&*,, i6@~,r%cs[[[ WM1jQQQ0OgkPMTA0,Q@2DOesI !I3c)z=Similar to `start_server` but works with UNIX Domain Sockets.cr&r'r(r)r+rr,Z"start_unix_server..factoryks&!D9F+F4G157HOrN)r rZcreate_unix_server)r*r-rr r,rs` ` @rrrfs9&&(  ,,WCdCCCCs4A>AcsJ[XoOoOojOoO OgoOoOoOoOo O o O o Qo d) FlowControlMixinitaReusable flow control logic for StreamWriter.drain(). This implements the protocol methods pause_writing(), resume_writing() and connection_lost(). If the subclass overrides these it must call the super methods. StreamWriter.drain() must wait for _drain_helper() coroutine. NcsQ`WM1QiJTiOQiWM 1QiOQidNF)r get_event_loop_loop_paused collectionsZdeque_drain_waiters_connection_lost)selfr r__init__ZFlowControlMixin.__init__~s< <..0DJJ )//1 %rcsOQiQMM1%^WMOQ1dd)NTz%r pauses writing)r2r1 get_debugrdebugr6 r pause_writingZFlowControlMixin.pause_writings0 ::   ! ! LL,d 3 "rcsOQiQMM1%^WMOQ1QM C+kQM 1%^HQMO1H- d)NFz%r resumes writing)r2r1r9rr:r4done set_resultr6waiterr7rresume_writingZFlowControlMixin.resume_writingsT ::   ! ! LL-t 4))F;;==!!$'*rcsOQiQM%adQMCAkQM1%^HQ`QM O1H0QM Q1HC dNT)r5r2r4r>r? set_exceptionr6excrA rconnection_lostZ FlowControlMixin.connection_lostsP $|| ))F;;==;%%d+((- *rcsb QM%^ WO1bQM%adQMM 1kQM M Q1QDOesI QM MQ1dI QM MQ1c9c3c)NzConnection lost)r5ZConnectionResetErrorr2r1 create_futurer4appendZremover@r7r _drain_helperZFlowControlMixin._drain_helpers  &'89 9|| ))+ ""6* /LL    & &v .     & &v .s0A$B/'B,B -B1B/ BB,,B/csWbr)NotImplementedErrorr6Zstreamr7r_get_close_waiterZ"FlowControlMixin._get_close_waiters!!r)r5r4r1r2r) __name__ __module__ __qualname____firstlineno____doc__r8r=rBrHrKrN__static_attributes____classdictcell__ __classdict__@rr.r.ts(&4 ( . /"rr.cs~[[XoOoOojOoOoOQ0OggoXO1oOo Oo Q0Ogo O o O o O oO oO oQoQ9o!)ria)Helper class to adapt between Protocol and StreamReader. (This is a helper class instead of making StreamReader itself a Protocol subclass, because the StreamReader has other potential uses, and to prevent the user of the StreamReader to accidentally call inappropriate methods of the protocol.) Ncs(:WPQZQO5Q_-WMQ1QiQM QiJOQiQ_TiOQiOQiOQi T i OQi QMM1Qid)NrF)superr8weakrefZref_stream_reader_wr_source_traceback_strong_reader_reject_connection_task _transport_client_connected_cb _over_sslr1rI_closed)r6Z stream_readerr*r __class__s rr8ZStreamReaderProtocol.__init__s d#  $%,[[%?D "%2%D%DD "%)D "  *#0 "' $7!zz//1 rcs>QM`dQM1!r)r[r;r<r_stream_readerZ#StreamReaderProtocol._stream_readers  ! ! )%%''rcsXQMkTiQMO1OGQid)N sslcontext)r1r`get_extra_inforb)r6r"rrGr_replace_transportZ'StreamReaderProtocol._replace_transports'zz#"11,?tKrcs~[[PM%^POO,kPM%^PMQO$PMMQ1PM 1dPPiPM kQ_QMP1PMO1OGPi PM_WPPQPM1kPMT41kWMQ1%^BQQ0OgkPMMQ1PiPMM!Q1OPidd)NmessagezpAn open stream was garbage collected prior to establishing network connection; call "stream.close()" explicitly.Zsource_tracebackrfcs:QM1%^PM1dQM1kQ_2PMM OOOQOP,1PM1dd)Nriz*Unhandled exception in client_connected_cb exceptionr") cancelledcloserjr1call_exception_handler)ZtaskrFr6r"s rcallbackZ6StreamReaderProtocol.connection_made..callbacksf~~''!)..*C 99%'S''; ") 'r)r^r\r1rmZabortr`re set_transportrgrbrarr Z iscoroutineZ create_taskr_Zadd_done_callbackr])r6r"Zcontextr!r$Zresrns`` rconnection_madeZ$StreamReaderProtocol.connection_mades  " "@G %%.2.D.D*+ JJ - -g 6 OO  #$$     +"11,?tK  $ $ 0!)T64::FF++F;C%%c** *"ZZ33C8  ,,X6"&D ) 1rcsv:QMkQ_%Q`QM1JQMQ1QMM 1%a:Q`QMM O1JQMMQ1W PQZQ1OQiOQi OQi OQi dr) refeed_eofrDrcr>r?rYrHr[_stream_writerr_r`)r6rFr!rds rrHZ$StreamReaderProtocol.connection_losts$$  {!$$S)||  ""{ ''- **3/ $!%" rcsFQMkQ_QMQ1ddr)re feed_data)r6datar!rGr data_receivedZ"StreamReaderProtocol.data_receiveds&$$     T " rcsfQMkQ_QM1QM%^dd)NFT)rerqrb)r6r!r7r eof_receivedZ!StreamReaderProtocol.eof_receiveds,$$   OO  >>rcQM!r)rcrMr7rrNZ&StreamReaderProtocol._get_close_waiter&s ||rcsQMkQM1%^'QM1%aQM1dddW^dc9cr)rcr>rkrjZAttributeError)r6Zclosedr7r__del__ZStreamReaderProtocol.__del__)sR #\\F{{}}V%5%5%7%7  "&8}   s A AA) rarcrbr^r\r[rrr]r_r`NN)rOrPrQrRrSr\r8propertyrerhrprHrurvrNrxrTrUZ __classcell__)rdrWs@@rrrsU2&(( L %'N$#  # #rrcs[XoOoOojOoOoOoXO1oOo Oo Oo O o O o O oO oOOgoOoOO OO OO ,OgoX0OgoOoQod )ri5aWraps a Transport. This exposes write(), writelines(), [can_]write_eof(), get_extra_info() and close(). It adds drain() which returns an optional Future on which you can wait for flow control. It also adds a transport property which references the Transport directly. csTiT iT0iT@iQMM 1QiQM M O1dr)r` _protocol_readerr1rI _complete_futr?)r6r"rr!r rr8ZStreamWriter.__init__?sA#!  !ZZ557 %%d+rcsQMMOQM8 /+kQM_QM OQM8 /1OM OM Q11!)N transport=zreader=<{}> )rdrOr`r|rJformatjoinr6Zinfor7r__repr__ZStreamWriter.__repr__Is['':doo5H)IJ << # KK'$,,!12 3}}SXXd^,,rcrwrr`r;r<rr"ZStreamWriter.transportOs rc:QMMQ1dr)r`writer6rtr7rrZStreamWriter.writeSs d#rcrr)r` writelinesrr7rrZStreamWriter.writelinesVs ""4(rc6QMM1!r)r` write_eofr;r<rrZStreamWriter.write_eofYs((**rcrr)r` can_write_eofr;r<rrZStreamWriter.can_write_eof\s,,..rcrr)r`rlr;r<rrlZStreamWriter.close_s$$&&rcrr)r` is_closingr;r<rrZStreamWriter.is_closingbs))++rcsV QMMQ1DOesI dI3cr)r{rNr;r<r wait_closedZStreamWriter.wait_closedesnn..t444s )')Ncs8QMMT1!r)r`rg)r6ZnameZdefaultrGrrgZStreamWriter.get_extra_infohs--d<B?BBserver_hostnamessl_handshake_timeoutssl_shutdown_timeoutc s QMMOGkQMkQM1DOesI QMM QM TaTRQQO5DOesI kTpiQM Q1dINI3c)z3Upgrade an existing stream-based connection to TLS.N) server_siderrr)r{rarr1 start_tlsr`rh)r6rfrrrrrZ new_transports rrZStreamWriter.start_tlss nn99E >>jjl"jj22 OOX#"7!5 377 (##M2 7s!8B B 1B ,B -B  B csQMM1%acQMM1%^QMOW 1dQM 1QMOQ8 /W 1dd)Nzloop is closedz unclosed )r`rr1Z is_closedZwarnZResourceWarningrl)r6warningsr7rrxZStreamWriter.__del__sZ))++zz##%% .@  $2OD ,r)r}r1r{r|r`r)rOrPrQrRrSr8rrzr"rrrrrlrrrgrrrrxrTrUrVrXrrr5s,- $)+/',5=-23(,3.23.23 (EErrcs[XoOoOojOoXO0OgoOoOoOo Oo Oo O o O o O oO oO oOoOOgoOOgoOoOoOoOoQod)riNcs|QO6:^ WO1bTiQ`WM1QiJT iW 1QiOQiOQiOQi OQi OQi QMM1%^0WMWM O11Qidd)NrzLimit cannot be <= 0Fr) ValueError_limitr r0r1Z bytearray_buffer_eof_waiter _exceptionr`r2r9r Z extract_stacksysZ _getframer\)r6rrrGrr8ZStreamReader.__init__s A:34 4 <..0DJJ {    ::   ! !%3%A%A a &"D " "rcsO+kQM%^'QMWQM1 O/1QM%^QMO1QMW 6w^QMOQM /1QM %^QMOQM 8 /1QM%^QMOQM8 /1QM%^QMOQM8 /1QM%^QMO1O MO MQ11!) Nrz bytesZeofzlimit=zwaiter=z exception=rZpausedrr) rrJlenrr_DEFAULT_LIMITrrr`r2rrrr7rrZStreamReader.__repr__s << KK3t||,-V4 5 99 KK  ;;. ( KK& . / << KK'$,,!12 3 ?? KK*T__$78 9 ?? KK*T__$78 9 << KK !}}SXXd^,,rcrwr)rr;r<rrjZStreamReader.exceptions rcsTiQMkQ_/OQiQM1%aQMQ1dddr)rrrkrDrErGrrDZStreamReader.set_exceptionsD  DL##%%$$S)& rcsQMkQ_/OQiQM1%aQMO1ddd)z1Wakeup read*() functions waiting for data or EOF.N)rrkr?r@r7r_wakeup_waiterZStreamReader._wakeup_waiters?  DL##%%!!$'& rcsTidrr)r6r"r7rroZStreamReader.set_transports#rcsQM%^FWQM1QM6:^"OQiQMM 1dddr/)r2rrrr`resume_readingr;r<r_maybe_resume_transportZ$StreamReader._maybe_resume_transports; <Q kQ kHD Q_JWOQO*Q* 1kT@M6^WMOQ1bQM%^FWQM 1k QM M1WMQ O1bQM!O 1DOesI BHT`M6^WMO Q1bQM OQk QM OQ.QM#1WQ 1!If3c) aRead data from the stream until ``separator`` is found. On success, the data and separator will be removed from the internal buffer (consumed). Returned data will include the separator at the end. Configured stream limit is used to check result. Limit sets the maximal length of data that can be returned, not counting the separator. If an EOF occurs and the complete separator is still not found, an IncompleteReadError exception will be raised, and the internal buffer will be reset. The IncompleteReadError.partial attribute may contain the separator partially. If the data cannot be read because of over limit, a LimitOverrunError exception will be raised, and the data will be left in the internal buffer, so it can be read again. The ``separator`` may also be a tuple of separators. In this case the return value will be the shortest possible that has any separator as the suffix. For the purposes of LimitOverrunError, the shortest possible separator is considered to be the one that matched. )Zkeyz-Separator should contain at least one elementrz,Separator should be at least one-byte stringNrz2Separator is not found, and chunk exceed the limitrz2Separator is found, but chunk is longer than limit)Z isinstanceZtupleZsortedrrrrZfindZmaxrr rrbytesrrrr) r6Z separatorZ min_seplenZ max_seplenZoffsetZbuflenZ match_startZ match_endrZisepZendZchunks rrZStreamReader.readuntil>s4 i ' 'yc2I" ILM M1& 2' ?KL L ?? &// !*&F*,"  $C<<,,S9Drz#SXo$,(+I*.K%(Q Z 78KK'$66L  yydll+ ""$ 44UDAA%%k2 2 2  $..DkS S Zi( LL) $ $$&U| 3s C HH)B/HG?A'Hcs QM_ QMbQO6X^dQO6^R+kQMQM1DOesI kQ%aJQMQ1H?OM Q1!QM %a*QM %aQMO1DOesI WWQM 1OQ1kQM OQ.QM1Q!IIH3c)a]Read up to `n` bytes from the stream. If `n` is not provided or set to -1, read until EOF, then return all read bytes. If EOF was received and the internal buffer is empty, return an empty bytes object. If `n` is 0, return an empty bytes object immediately. If `n` is positive, return at most `n` available bytes as soon as at least 1 byte is available in the internal buffer. If EOF is received before any byte is read, return an empty bytes object. Returned value is not limited with limit, configured at stream creation. If stream was paused, this function will automatically resume it if needed. Nrrread) rrrrJrrrrr memoryviewr)r6nZblocksZblockrtr~rrZStreamReader.reads, ?? &// ! 6 q5 F"ii 44 e$88F# #||DII%%f- - -Z -bq12 LL!  $$& 5 .s&AC< C8 A&C<1C:2AC<:C<cs QO6^ WO1bQM_ QMbQO6X^dWQM1Q6^qQM%^EW QM1kQMM 1WMT!1bQMO1DOesI HWQM1Q6X^0W QM1kQMM 1J0W WQM1OQ1kQMOQ.QM1Q!I3c)aRead exactly `n` bytes. Raise an IncompleteReadError if EOF is reached before `n` bytes can be read. The IncompleteReadError.partial attribute of the exception will contain the partial read bytes. if n is zero, return empty bytes object. Returned value is not limited with limit, configured at stream creation. If stream was paused, this function will automatically resume it if needed. rz*readexactly size can not be less than zeroNr readexactly) rrrrrrrr rrrr)r6rZ incompleterts rrZStreamReader.readexactlys q5IJ J ?? &// ! 6$,,!#yy"4<<0  ""$ 44ZCC%%m4 4 4 t||  !&D LL   DLL1"156D RaR  $$&  5sB5E 7E 8BE csQ!rrr;r<r __aiter__ZStreamReader.__aiter__ s rcsZ QM1DOesI kQO6X^WbQ!I3c)Nr)rZStopAsyncIteration)r6Zvalr7r __anext__ZStreamReader.__anext__s*MMO# #:$ $ $s +)+) rrrrr1r2r\r`r)r)r)rOrPrQrRr\rr8rrjrDrrorrqrrsrrrrrrrrTrUrVrXrrrsi+$",-$*($- .$, 8>pd1f'Rrrryr)Z__all__r3ZsocketrrrZZhasattrZr r r r r ZlogrZtasksrrrrrrZProtocolr.rrrrrrrs '  69 <