/snap/core22/2437/usr/lib/python3.10/asyncio/__pycache__
NameSizeModeActions
base_events.cpython-310.pyc518520644editdlrm
base_futures.cpython-310.pyc19110644editdlrm
base_subprocess.cpython-310.pyc93860644editdlrm
base_tasks.cpython-310.pyc19810644editdlrm
constants.cpython-310.pyc5860644editdlrm
coroutines.cpython-310.pyc66210644editdlrm
events.cpython-310.pyc283060644editdlrm
exceptions.cpython-310.pyc24680644editdlrm
format_helpers.cpython-310.pyc23390644editdlrm
futures.cpython-310.pyc118870644editdlrm
locks.cpython-310.pyc141730644editdlrm
log.cpython-310.pyc2290644editdlrm
mixins.cpython-310.pyc10770644editdlrm
proactor_events.cpython-310.pyc246980644editdlrm
protocols.cpython-310.pyc82980644editdlrm
queues.cpython-310.pyc83000644editdlrm
runners.cpython-310.pyc20920644editdlrm
selector_events.cpython-310.pyc295780644editdlrm
sslproto.cpython-310.pyc219540644editdlrm
staggered.cpython-310.pyc41830644editdlrm
streams.cpython-310.pyc203830644editdlrm
subprocess.cpython-310.pyc70620644editdlrm
tasks.cpython-310.pyc239730644editdlrm
threads.cpython-310.pyc9850644editdlrm
transports.cpython-310.pyc123320644editdlrm
trsock.cpython-310.pyc78420644editdlrm
unix_events.cpython-310.pyc416910644editdlrm
windows_events.cpython-310.pyc241470644editdlrm
windows_utils.cpython-310.pyc44960644editdlrm
__init__.cpython-310.pyc7440644editdlrm
__main__.cpython-310.pyc31710644editdlrm
Edit: /snap/core22/2437/usr/lib/python3.10/asyncio/__pycache__/protocols.cpython-310.pyc (8298B)
o p̦i-ã@sbdZdZGdd„dƒZGdd„deƒZGdd„deƒZGdd „d eƒZGd d „d eƒZd d „ZdS)zAbstract Protocol base classes.)Ú BaseProtocolÚProtocolÚDatagramProtocolÚSubprocessProtocolÚBufferedProtocolc@s4eZdZdZdZdd„Zdd„Zdd„Zd d „Zd S) ra Common base class for protocol interfaces. Usually user implements protocols that derived from BaseProtocol like Protocol or ProcessProtocol. The only case when BaseProtocol should be implemented directly is write-only transport like write pipe ©cCódS)zðCalled when a connection is made. The argument is the transport representing the pipe connection. To receive data, wait for data_received() calls. When the connection is closed, connection_lost() is called. Nr)ÚselfÚ transportrrú(/usr/lib/python3.10/asyncio/protocols.pyÚconnection_madeózBaseProtocol.connection_madecCr)zÓCalled when the connection is lost or closed. The argument is an exception object or None (the latter meaning a regular EOF is received or the connection was aborted or closed). Nr©rÚexcrrr Úconnection_lostr zBaseProtocol.connection_lostcCr)aCalled when the transport's buffer goes over the high-water mark. Pause and resume calls are paired -- pause_writing() is called once when the buffer goes strictly over the high-water mark (even if subsequent writes increases the buffer size even more), and eventually resume_writing() is called once when the buffer size reaches the low-water mark. Note that if the buffer size equals the high-water mark, pause_writing() is not called -- it must go strictly over. Conversely, resume_writing() is called when the buffer size is equal or lower than the low-water mark. These end conditions are important to ensure that things go as expected when either mark is zero. NOTE: This is the only Protocol callback that is not called through EventLoop.call_soon() -- if it were, it would have no effect when it's most needed (when the app keeps writing without yielding until pause_writing() is called). Nr©rrrr Ú pause_writing%r zBaseProtocol.pause_writingcCr)zvCalled when the transport's buffer drains below the low-water mark. See pause_writing() for details. Nrrrrr Úresume_writing;r zBaseProtocol.resume_writingN) Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__r rrrrrrr r s  rc@ó$eZdZdZdZdd„Zdd„ZdS)ranInterface for stream protocol. The user should implement this interface. They can inherit from this class but don't need to. The implementations here do nothing (they don't raise exceptions). When the user wants to requests a transport, they pass a protocol factory to a utility function (e.g., EventLoop.create_connection()). When the connection is made successfully, connection_made() is called with a suitable transport object. Then data_received() will be called 0 or more times with data (bytes) received from the transport; finally, connection_lost() will be called exactly once with either an exception object or None as an argument. State machine of calls: start -> CM [-> DR*] [-> ER?] -> CL -> end * CM: connection_made() * DR: data_received() * ER: eof_received() * CL: connection_lost() rcCr)zTCalled when some data is received. The argument is a bytes object. Nr)rÚdatarrr Ú data_received^r zProtocol.data_receivedcCr©z÷Called when the other end calls write_eof() or equivalent. If this returns a false value (including None), the transport will close itself. If it returns a true value, closing the transport is up to the protocol. Nrrrrr Ú eof_receiveddr zProtocol.eof_receivedN)rrrrrrrrrrr rBs  rc@ó,eZdZdZdZdd„Zdd„Zdd„Zd S) ra:Interface for stream protocol with manual buffer control. Event methods, such as `create_server` and `create_connection`, accept factories that return protocols that implement this interface. The idea of BufferedProtocol is that it allows to manually allocate and control the receive buffer. Event loops can then use the buffer provided by the protocol to avoid unnecessary data copies. This can result in noticeable performance improvement for protocols that receive big amounts of data. Sophisticated protocols can allocate the buffer only once at creation time. State machine of calls: start -> CM [-> GB [-> BU?]]* [-> ER?] -> CL -> end * CM: connection_made() * GB: get_buffer() * BU: buffer_updated() * ER: eof_received() * CL: connection_lost() rcCr)aPCalled to allocate a new receive buffer. *sizehint* is a recommended minimal size for the returned buffer. When set to -1, the buffer size can be arbitrary. Must return an object that implements the :ref:`buffer protocol `. It is an error to return a zero-sized buffer. Nr)rÚsizehintrrr Ú get_buffer‡r zBufferedProtocol.get_buffercCr)z›Called when the buffer was updated with the received data. *nbytes* is the total number of bytes that were written to the buffer. Nr)rÚnbytesrrr Úbuffer_updated’r zBufferedProtocol.buffer_updatedcCrrrrrrr r™r zBufferedProtocol.eof_receivedN)rrrrrrr!rrrrr rms  rc@r)rz Interface for datagram protocol.rcCr)z&Called when some datagram is received.Nr)rrÚaddrrrr Údatagram_received§r z"DatagramProtocol.datagram_receivedcCr)z~Called when a send or receive operation raises an OSError. (Other than BlockingIOError or InterruptedError.) Nrr rrr Úerror_receivedªr zDatagramProtocol.error_receivedN)rrrrrr#r$rrrr r¢s  rc@r) rz,Interface for protocol for subprocess calls.rcCr)zŠCalled when the subprocess writes data into stdout/stderr pipe. fd is int file descriptor. data is bytes object. Nr)rÚfdrrrr Úpipe_data_received¶r z%SubprocessProtocol.pipe_data_receivedcCr)z“Called when a file descriptor associated with the child process is closed. fd is the int file descriptor that was closed. Nr)rr%rrrr Úpipe_connection_lost½r z'SubprocessProtocol.pipe_connection_lostcCr)z"Called when subprocess has exited.Nrrrrr Úprocess_exitedÄr z!SubprocessProtocol.process_exitedN)rrrrrr&r'r(rrrr r±s  rcCsŠt|ƒ}|rC| |¡}t|ƒ}|stdƒ‚||kr&||d|…<| |¡dS|d|…|d|…<| |¡||d…}t|ƒ}|sdSdS)Nz%get_buffer() returned an empty buffer)ÚlenrÚ RuntimeErrorr!)ÚprotorÚdata_lenÚbufÚbuf_lenrrr Ú_feed_data_to_buffered_protoÈs      òr/N)rÚ__all__rrrrrr/rrrr Ús9+5