uawdijnntqw1x1x1
IP : 18.191.147.254
Hostname : ns1.eurodns.top
Kernel : Linux ns1.eurodns.top 4.18.0-553.5.1.lve.1.el7h.x86_64 #1 SMP Fri Jun 14 14:24:52 UTC 2024 x86_64
Disable Function : mail,sendmail,exec,passthru,shell_exec,system,popen,curl_multi_exec,show_source,eval,open_base
OS : Linux
PATH:
/
home
/
sudancam
/
.
/
..
/
..
/
lib64
/
galera
/
..
/
python2.7
/
asynchat.pyo
/
/
� �mec@s�dZddlZddlZddlmZddlmZddlmZm Z dej fd��YZdd d ��YZd dd��YZ d�ZdS(s�A class supporting chat-style (command/response) protocols. This class adds support for 'chat' style protocols - where one side sends a 'command', and the other sends a response (examples would be the common internet protocols - smtp, nntp, ftp, etc..). The handle_read() method looks at the input stream for the current 'terminator' (usually '\r\n' for single-line responses, '\r\n.\r\n' for multi-line output), calling self.found_terminator() on its receipt. for example: Say you build an async nntp client using this class. At the start of the connection, you'll have self.terminator set to '\r\n', in order to process the single-line greeting. Just before issuing a 'LIST' command you'll set it to '\r\n.\r\n'. The output of the LIST command will be accumulated (using your own 'collect_incoming_data' method) up to the terminator, and then control will be returned to you - by calling your self.found_terminator() method. i����N(tdeque(tpy3kwarning(tfilterwarningstcatch_warningst async_chatcBs�eZdZdZdZddd�Zd�Zd�Zd�Z d�Z d�Zd�Zd �Z d �Zd�Zd�Zd �Zd�Zd�Zd�Zd�Zd�ZRS(s�This is an abstract class. You must derive from this class, and add the two methods collect_incoming_data() and found_terminator()icCs8d|_g|_t�|_tjj|||�dS(Nt(tac_in_buffertincomingRt producer_fifotasyncoret dispatchert__init__(tselftsocktmap((s /usr/lib64/python2.7/asynchat.pyR@s cCstd��dS(Nsmust be implemented in subclass(tNotImplementedError(Rtdata((s /usr/lib64/python2.7/asynchat.pytcollect_incoming_dataQscCs|jj|�dS(N(Rtappend(RR((s /usr/lib64/python2.7/asynchat.pyt_collect_incoming_dataTscCsdj|j�}|j2|S(NR(tjoinR(Rtd((s /usr/lib64/python2.7/asynchat.pyt _get_dataWscCstd��dS(Nsmust be implemented in subclass(R(R((s /usr/lib64/python2.7/asynchat.pytfound_terminator\scCs ||_dS(sRSet the input delimiter. Can be a fixed string of any length, an integer, or NoneN(t terminator(Rtterm((s /usr/lib64/python2.7/asynchat.pytset_terminator_scCs|jS(N(R(R((s /usr/lib64/python2.7/asynchat.pytget_terminatorcscCs y|j|j�}Wn!tjk r9}|j�dSX|j||_x�|jrt|j�}|j�}|s�|j|j�d|_qMt |t �s�t |t�r)|}||kr�|j|j�d|_|j||_q|j|j| �|j||_d|_|j �qMt|�}|jj|�}|dkr�|dkrv|j|j| �n|j|||_|j �qMt|j|�}|r�||kr�|j|j| �|j||_nPqM|j|j�d|_qMWdS(NRii����(trecvtac_in_buffer_sizetsocketterrorthandle_errorRtlenRRt isinstancetinttlongRRtfindtfind_prefix_at_end(RRtwhytlbRtntterminator_lentindex((s /usr/lib64/python2.7/asynchat.pythandle_readksJ cCs|j�dS(N(t initiate_send(R((s /usr/lib64/python2.7/asynchat.pythandle_write�scCs|j�dS(N(tclose(R((s /usr/lib64/python2.7/asynchat.pythandle_close�scCsz|j}t|�|kr\xNtdt|�|�D]!}|jj||||!�q4Wn|jj|�|j�dS(Ni(tac_out_buffer_sizeR!txrangeRRR-(RRtsabsti((s /usr/lib64/python2.7/asynchat.pytpush�s "cCs|jj|�|j�dS(N(RRR-(Rtproducer((s /usr/lib64/python2.7/asynchat.pytpush_with_producer�scCsdS(s4predicate for inclusion in the readable for select()i((R((s /usr/lib64/python2.7/asynchat.pytreadable�scCs|jp|jS(s4predicate for inclusion in the writable for select()(Rt connected(R((s /usr/lib64/python2.7/asynchat.pytwritable�scCs|jjd�dS(sAautomatically close this channel once the outgoing queue is emptyN(RRtNone(R((s /usr/lib64/python2.7/asynchat.pytclose_when_done�sc Csfx_|jra|jra|jd}|sO|jd=|dkrO|j�dSn|j}y?t��0tr~tddt�nt |d|�}WdQXWnCt k r�|j�}|r�|jj|�q|jd=qnXy|j |�}Wntjk r|j�dSX|r]|t|�ks<|t|�krP|||jd<q]|jd=ndSWdS(Nitignores.*buffer(RR9R;R0R1RRRtDeprecationWarningtbuffert TypeErrortmoret appendlefttsendRRR R!(RtfirsttobsRtnum_sent((s /usr/lib64/python2.7/asynchat.pyR-�s: $ cCs!d|_|j2|jj�dS(NR(RRRtclear(R((s /usr/lib64/python2.7/asynchat.pytdiscard_buffers�s N(t__name__t __module__t__doc__RR1R;RRRRRRRR,R.R0R5R7R8R:R<R-RH(((s /usr/lib64/python2.7/asynchat.pyR7s( B (tsimple_producercBseZdd�Zd�ZRS(icCs||_||_dS(N(Rtbuffer_size(RRRM((s /usr/lib64/python2.7/asynchat.pyRs cCsYt|j�|jkr?|j|j }|j|j|_|S|j}d|_|SdS(NR(R!RRM(Rtresult((s /usr/lib64/python2.7/asynchat.pyRAs (RIRJRRA(((s /usr/lib64/python2.7/asynchat.pyRL�stfifocBsAeZdd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs(|st�|_nt|�|_dS(N(Rtlist(RRP((s /usr/lib64/python2.7/asynchat.pyRscCs t|j�S(N(R!RP(R((s /usr/lib64/python2.7/asynchat.pyt__len__scCs|jS(N(RP(R((s /usr/lib64/python2.7/asynchat.pytis_emptyscCs|jdS(Ni(RP(R((s /usr/lib64/python2.7/asynchat.pyRDscCs|jj|�dS(N(RPR(RR((s /usr/lib64/python2.7/asynchat.pyR5scCs$|jrd|jj�fSdSdS(Nii(iN(RPtpopleftR;(R((s /usr/lib64/python2.7/asynchat.pytpop!s N( RIRJR;RRQRRRDR5RT(((s /usr/lib64/python2.7/asynchat.pyROs cCs?t|�d}x(|r:|j|| �r:|d8}qW|S(Ni(R!tendswith(thaystacktneedletl((s /usr/lib64/python2.7/asynchat.pyR&6s(((RKRR tcollectionsRtsysRtwarningsRRR RRLROR&(((s /usr/lib64/python2.7/asynchat.pyt<module>/s�(
/home/sudancam/./../../lib64/galera/../python2.7/asynchat.pyo