3 \R'@sddlmZddddddgZGdddZGd ddeZGd ddeZGd ddeeZGd ddeZGd ddeZGdddeZ dS))compat BaseTransport ReadTransportWriteTransport TransportDatagramTransportSubprocessTransportc@s@eZdZdddZdddZddZdd Zd d Zd d ZdS)rNcCs|dkr i}||_dS)N)_extra)selfextrar */usr/lib64/python3.6/asyncio/transports.py__init__ szBaseTransport.__init__cCs|jj||S)N)r get)r namedefaultr r r get_extra_infoszBaseTransport.get_extra_infocCstdS)N)NotImplementedError)r r r r is_closingszBaseTransport.is_closingcCstdS)N)r)r r r r closeszBaseTransport.closecCstdS)N)r)r protocolr r r set_protocol$szBaseTransport.set_protocolcCstdS)N)r)r r r r get_protocol(szBaseTransport.get_protocol)N)N) __name__ __module__ __qualname__rrrrrrr r r r r s    c@seZdZddZddZdS)rcCstdS)N)r)r r r r pause_reading0szReadTransport.pause_readingcCstdS)N)r)r r r r resume_reading8szReadTransport.resume_readingN)rrrrrr r r r r-sc@sFeZdZdddZddZddZdd Zd d Zd d ZddZ dS)rNcCstdS)N)r)r highlowr r r set_write_buffer_limitsDsz&WriteTransport.set_write_buffer_limitscCstdS)N)r)r r r r get_write_buffer_sizeYsz$WriteTransport.get_write_buffer_sizecCstdS)N)r)r datar r r write]szWriteTransport.writecCstj|}|j|dS)N)rZflatten_list_bytesr#)r Z list_of_datar"r r r writelineses zWriteTransport.writelinescCstdS)N)r)r r r r write_eofnszWriteTransport.write_eofcCstdS)N)r)r r r r can_write_eofwszWriteTransport.can_write_eofcCstdS)N)r)r r r r abort{szWriteTransport.abort)NN) rrrr r!r#r$r%r&r'r r r r rAs   c@s eZdZdS)rN)rrrr r r r rsc@seZdZdddZddZdS)rNcCstdS)N)r)r r"Zaddrr r r sendtoszDatagramTransport.sendtocCstdS)N)r)r r r r r'szDatagramTransport.abort)N)rrrr(r'r r r r rs c@s<eZdZddZddZddZddZd d Zd d Zd S)rcCstdS)N)r)r r r r get_pidszSubprocessTransport.get_pidcCstdS)N)r)r r r r get_returncodesz"SubprocessTransport.get_returncodecCstdS)N)r)r fdr r r get_pipe_transportsz&SubprocessTransport.get_pipe_transportcCstdS)N)r)r signalr r r send_signalszSubprocessTransport.send_signalcCstdS)N)r)r r r r terminates zSubprocessTransport.terminatecCstdS)N)r)r r r r kills zSubprocessTransport.killN) rrrr)r*r,r.r/r0r r r r rs csReZdZdfdd ZddZddZdd Zdd d Zdd d ZddZ Z S)_FlowControlMixinNcs$tj|||_d|_|jdS)NF)superr_loop_protocol_paused_set_write_buffer_limits)r r Zloop) __class__r r rs z_FlowControlMixin.__init__cCsp|j}||jkrdS|jsld|_y|jjWn:tk rj}z|jjd|||jdWYdd}~XnXdS)NTzprotocol.pause_writing() failed)message exception transportr)r! _high_waterr4 _protocolZ pause_writing Exceptionr3call_exception_handler)r sizeexcr r r _maybe_pause_protocols z'_FlowControlMixin._maybe_pause_protocolcCsh|jrd|j|jkrdd|_y|jjWn:tk rb}z|jjd|||jdWYdd}~XnXdS)NFz protocol.resume_writing() failed)r7r8r9r)r4r! _low_waterr;Zresume_writingr<r3r=)r r?r r r _maybe_resume_protocolsz(_FlowControlMixin._maybe_resume_protocolcCs |j|jfS)N)rAr:)r r r r get_write_buffer_limitssz)_FlowControlMixin.get_write_buffer_limitscCsf|dkr|dkrd}nd|}|dkr.|d}||ko@dknsVtd||f||_||_dS)N@irz*high (%r) must be >= low (%r) must be >= 0i) ValueErrorr:rA)r rrr r r r5s z*_FlowControlMixin._set_write_buffer_limitscCs|j||d|jdS)N)rr)r5r@)r rrr r r r -sz)_FlowControlMixin.set_write_buffer_limitscCstdS)N)r)r r r r r!1sz'_FlowControlMixin.get_write_buffer_size)NN)NN)NN) rrrrr@rBrCr5r r! __classcell__r r )r6r r1s  r1N) Zasyncior__all__rrrrrrr1r r r r s  #D4