e8*SrSr"SS5r"SS\5r"SS\5r"SS \\5r"S S \5r"S S \5r"SS\5rg)zAbstract Transport class.) BaseTransport ReadTransportWriteTransport TransportDatagramTransportSubprocessTransportcH\rSrSrSrSrS SjrS SjrSrSr S r S r Sr g) r zBase class for transports._extraNcUc0nXlgNr )selfextras 8/opt/imh/python3.13/lib/python3.13/asyncio/transports.py__init__BaseTransport.__init__s =E c8URRX5$)z#Get optional transport information.)r get)rnamedefaults rget_extra_infoBaseTransport.get_extra_infos{{t--rc[e)z2Return True if the transport is closing or closed.NotImplementedErrorrs r is_closingBaseTransport.is_closing!!rc[e)zClose the transport. Buffered data will be flushed asynchronously. No more data will be received. After all buffered data is flushed, the protocol's connection_lost() method will (eventually) be called with None as its argument. rrs rcloseBaseTransport.closes "!rc[e)zSet a new protocol.r)rprotocols r set_protocolBaseTransport.set_protocol%r rc[e)zReturn the current protocol.rrs r get_protocolBaseTransport.get_protocol)r rr ) __name__ __module__ __qualname____firstlineno____doc__ __slots__rrrr"r&r)__static_attributes__rrrr s($I .""""rrc.\rSrSrSrSrSrSrSrSr g)r.z#Interface for read-only transports.r2c[e)z*Return True if the transport is receiving.rrs r is_readingReadTransport.is_reading3r rc[e)z|Pause the receiving end. No data will be passed to the protocol's data_received() method until resume_reading() is called. rrs r pause_readingReadTransport.pause_reading7 "!rc[e)zmResume the receiving end. Data received will once again be passed to the protocol's data_received() method. rrs rresume_readingReadTransport.resume_reading?r;rN) r+r,r-r.r/r0r6r9r=r1r2rrrr.s-I"""rrcP\rSrSrSrSrS SjrSrSrSr S r S r S r S r Srg)rHz$Interface for write-only transports.r2Nc[e)a.Set the high- and low-water limits for write flow control. These two values control when to call the protocol's pause_writing() and resume_writing() methods. If specified, the low-water limit must be less than or equal to the high-water limit. Neither value can be negative. The defaults are implementation-specific. If only the high-water limit is given, the low-water limit defaults to an implementation-specific value less than or equal to the high-water limit. Setting high to zero forces low to zero as well, and causes pause_writing() to be called whenever the buffer becomes non-empty. Setting low to zero causes resume_writing() to be called only once the buffer is empty. Use of zero for either limit is generally sub-optimal as it reduces opportunities for doing I/O and computation concurrently. rrhighlows rset_write_buffer_limits&WriteTransport.set_write_buffer_limitsMs &"!rc[e)z,Return the current size of the write buffer.rrs rget_write_buffer_size$WriteTransport.get_write_buffer_sizebr rc[e)zGet the high and low watermarks for write flow control. Return a tuple (low, high) where low and high are positive number of bytes.rrs rget_write_buffer_limits&WriteTransport.get_write_buffer_limitsfs "!rc[e)zWrite some data bytes to the transport. This does not block; it buffers the data and arranges for it to be sent out asynchronously. r)rdatas rwriteWriteTransport.writelr;rcHSRU5nURU5 g)zWrite a list (or any iterable) of data bytes to the transport. The default implementation concatenates the arguments and calls write() on the result. rN)joinrO)r list_of_datarNs r writelinesWriteTransport.writelinests xx % 4rc[e)zClose the write end after flushing buffered data. (This is like typing ^D into a UNIX program reading from stdin.) Data may still be received. rrs r write_eofWriteTransport.write_eof} "!rc[e)zAReturn True if this transport supports write_eof(), False if not.rrs r can_write_eofWriteTransport.can_write_eofr rc[ezClose the transport immediately. Buffered data will be lost. No more data will be received. The protocol's connection_lost() method will (eventually) be called with None as its argument. rrs rabortWriteTransport.abortrYrNN)r+r,r-r.r/r0rErHrKrOrTrWr[r_r1r2rrrrHs2.I"*"" """"rrc\rSrSrSrSrSrg)raInterface representing a bidirectional transport. There may be several implementations, but typically, the user does not implement new transports; rather, the platform provides some useful transports that are implemented using the platform's best practices. The user never instantiates a transport directly; they call a utility function, passing it a protocol factory and other information necessary to create the transport and protocol. (E.g. EventLoop.create_connection() or EventLoop.create_server().) The utility function will asynchronously create a transport and a protocol and hook them up by calling the protocol's connection_made() method, passing it the transport. The implementation here raises NotImplemented for every method except writelines(), which calls write() in a loop. r2N)r+r,r-r.r/r0r1r2rrrrs(Irrc,\rSrSrSrSrSSjrSrSrg)rz(Interface for datagram (UDP) transports.r2Nc[e)a Send data to the transport. This does not block; it buffers the data and arranges for it to be sent out asynchronously. addr is target socket address. If addr is None use target address pointed on transport creation. If data is an empty bytes object a zero-length datagram will be sent. r)rrNaddrs rsendtoDatagramTransport.sendtos "!rc[er^rrs rr_DatagramTransport.abortrYrr ) r+r,r-r.r/r0rhr_r1r2rrrrs2I ""rrc<\rSrSrSrSrSrSrSrSr Sr Sr g ) rr2c[e)zGet subprocess id.rrs rget_pidSubprocessTransport.get_pidr rc[e)zmGet subprocess returncode. See also http://docs.python.org/3/library/subprocess#subprocess.Popen.returncode rrs rget_returncode"SubprocessTransport.get_returncoder;rc[e)z&Get transport for pipe with number fd.r)rfds rget_pipe_transport&SubprocessTransport.get_pipe_transportr rc[e)zhSend signal to subprocess. See also: docs.python.org/3/library/subprocess#subprocess.Popen.send_signal r)rsignals r send_signalSubprocessTransport.send_signalr;rc[e)aStop the subprocess. Alias for close() method. On Posix OSs the method sends SIGTERM to the subprocess. On Windows the Win32 API function TerminateProcess() is called to stop the subprocess. See also: http://docs.python.org/3/library/subprocess#subprocess.Popen.terminate rrs r terminateSubprocessTransport.terminates "!rc[e)zKill the subprocess. On Posix OSs the function sends SIGKILL to the subprocess. On Windows kill() is an alias for terminate(). See also: http://docs.python.org/3/library/subprocess#subprocess.Popen.kill rrs rkillSubprocessTransport.kills "!rN) r+r,r-r.r0rorrrvrzr}rr1r2rrrrs%I"""" " "rrc`^\rSrSrSrSrS U4SjjrSrSrSr S Sjr S S jr S r S r U=r$) _FlowControlMixinaJAll the logic for (write) flow control in a mix-in base class. The subclass must implement get_write_buffer_size(). It must call _maybe_pause_protocol() whenever the write buffer size increases, and _maybe_resume_protocol() whenever it decreases. It may also override set_write_buffer_limits() (e.g. to specify different defaults). The subclass constructor must call super().__init__(extra). This will call set_write_buffer_limits(). The user may call set_write_buffer_limits() and get_write_buffer_size(), and their protocol's pause_writing() and resume_writing() may be called. )_loop_protocol_paused _high_water _low_waterch>[TU]U5 UceX lSUlUR 5 g)NF)superrrr_set_write_buffer_limits)rrloop __class__s rr_FlowControlMixin.__init__s5  % %%'rcNUR5nXR::agUR(d#SUlURR 5 gg![ [ 4a e[a4nURRSUUURS.5 SnAgSnAff=f)NTzprotocol.pause_writing() failedmessage exception transportr%) rHrr _protocol pause_writing SystemExitKeyboardInterrupt BaseExceptionrcall_exception_handler)rsizeexcs r_maybe_pause_protocol'_FlowControlMixin._maybe_pause_protocols))+ ## # $$$(D ! ,,.% 12    11@!$!% $ 3 sAB$0*BB$cLUR(aBUR5UR::a#SUlURR 5 ggg![ [ 4a e[a4nURRSUUURS.5 SnAgSnAff=f)NFz protocol.resume_writing() failedr) rrHrrresume_writingrrrrr)rrs r_maybe_resume_protocol(_FlowControlMixin._maybe_resume_protocol)s  ! !**,?$)D ! --/@ "  12    11A!$!% $ 3 sAB#/*BB#c2URUR4$r )rrrs rrK)_FlowControlMixin.get_write_buffer_limits9s!1!122rcUc UcSnOSU-nUcUS-nXs=:aS:dO [SU<SU<S35eXlX lg)Nizhigh (z) must be >= low (z) must be >= 0) ValueErrorrrrBs rr*_FlowControlMixin._set_write_buffer_limits<sb <{ 3w ;!)Ca 23'HJ J rcBURXS9 UR5 g)N)rCrD)rrrBs rrE)_FlowControlMixin.set_write_buffer_limitsLs %%4%9 ""$rc[er rrs rrH'_FlowControlMixin.get_write_buffer_sizePs!!r)rrrrra)r+r,r-r.r/r0rrrrKrrErHr1 __classcell__)rs@rrrs8 KI($ 3 %""rrN) r/__all__rrrrrrrr2rrrsj  """"J"M"4I"]I"X ~0" "63"-3"lT" T"r