-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/multiprocessing/
File Upload :
Current File : //usr/lib/python2.7/multiprocessing/connection.pyc

ó
¾V}]c@sydddgZddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZddlm
Z
mZmZmZddlmZmZdZd	ZejƒZd
Zd
gZeedƒr	dZedg7Znejdkr.d
Zed
g7Zned„Zd„Zd„Zd„Zde fd„ƒYZ!ddd„Z#ejdkr˜e$d„Z%nddlm&Z&e$d„Z%de fd„ƒYZ'd„Z(ejdkrde fd„ƒYZ)d„Z*ndZ+dZ,dZ-d Z.d!„Z/d"„Z0d#e fd$„ƒYZ1d%„Z2d&„Z3d'e!fd(„ƒYZ4d)„Z5dS(*tClienttListenertPipeiÿÿÿÿN(tcurrent_processtAuthenticationError(tget_temp_dirtFinalizet	sub_debugtdebug(t	duplicatetclosei g4@tAF_INETtAF_UNIXtwin32tAF_PIPEcCstjƒ|S(N(ttime(ttimeout((s0/usr/lib/python2.7/multiprocessing/connection.pyt
_init_timeoutIscCstjƒ|kS(N(R(tt((s0/usr/lib/python2.7/multiprocessing/connection.pyt_check_timeoutLscCs}|dkrd
S|dkr5tjdddtƒƒS|dkrmtjdd	tjƒtjƒfdd
ƒStdƒ‚dS(s?
    Return an arbitrary free address for the given family
    Rt	localhostiRtprefixs	listener-tdirRs\\.\pipe\pyc-%d-%d-tsunrecognized familyN(Ri(ttempfiletmktempRtostgetpidt
_mmap_countertnextt
ValueError(tfamily((s0/usr/lib/python2.7/multiprocessing/connection.pytarbitrary_addressSs cCset|ƒtkrdSt|ƒtkr;|jdƒr;dSt|ƒtkrQdStd|ƒ‚dS(s]
    Return the types of the address

    This can be 'AF_INET', 'AF_UNIX', or 'AF_PIPE'
    Rs\\RRsaddress type of %r unrecognizedN(ttypettupletstrt
startswithR(taddress((s0/usr/lib/python2.7/multiprocessing/connection.pytaddress_typebs!cBsSeZdZddddd„Zd„Zd„Zed„ƒZed„ƒZ	RS(s•
    Returns a listener object.

    This is a wrapper for a bound socket which is 'listening' for
    connections, or for a Windows named pipe.
    icCs›|p|rt|ƒpt}|p-t|ƒ}|dkrQt||ƒ|_nt|||ƒ|_|dk	rŽt|tƒrŽt	d‚n||_
dS(NRsauthkey should be a byte string(R&tdefault_familyR tPipeListenert	_listenertSocketListenertNonet
isinstancetbytest	TypeErrort_authkey(tselfR%Rtbacklogtauthkey((s0/usr/lib/python2.7/multiprocessing/connection.pyt__init__|scCs?|jjƒ}|jr;t||jƒt||jƒn|S(sz
        Accept a connection on the bound socket or named pipe of `self`.

        Returns a `Connection` object.
        (R)tacceptR/tdeliver_challengetanswer_challenge(R0tc((s0/usr/lib/python2.7/multiprocessing/connection.pyR4‹s
	cCs
|jjƒS(sA
        Close the bound socket or named pipe of `self`.
        (R)R
(R0((s0/usr/lib/python2.7/multiprocessing/connection.pyR
—scCs
|jjS(N(R)t_address(R0((s0/usr/lib/python2.7/multiprocessing/connection.pyt<lambda>scCs
|jjS(N(R)t_last_accepted(R0((s0/usr/lib/python2.7/multiprocessing/connection.pyR9žsN(
t__name__t
__module__t__doc__R+R3R4R
tpropertyR%t
last_accepted(((s0/usr/lib/python2.7/multiprocessing/connection.pyRus		cCsŽ|pt|ƒ}|dkr-t|ƒ}nt|ƒ}|dk	rat|tƒratd‚n|dk	rŠt||ƒt||ƒn|S(s=
    Returns a connection to the address of a `Listener`
    Rsauthkey should be a byte stringN(	R&t
PipeClienttSocketClientR+R,R-R.R6R5(R%RR2R7((s0/usr/lib/python2.7/multiprocessing/connection.pyR¡s
cCsË|r…tjƒ\}}|jtƒ|jtƒtjtj|jƒƒƒ}tjtj|jƒƒƒ}|j	ƒ|j	ƒn<tj
ƒ\}}tj|dtƒ}tj|dtƒ}||fS(sL
        Returns pair of connection objects at either end of a pipe
        twritabletreadable(tsockett
socketpairtsetblockingtTruet_multiprocessingt
ConnectionRtduptfilenoR
tpipetFalse(tduplexts1ts2tc1tc2tfd1tfd2((s0/usr/lib/python2.7/multiprocessing/connection.pyR·s



(R
c	CsUtdƒ}|r;tj}tjtjB}tt}}ntj}tj}dt}}tj||tjtj	Btj
Bd||tjtjƒ}tj
||dtjtjdtjƒ}tj|tj	ddƒytj|tjƒWn/tk
r }|jdtjkr!‚q!nXtj|d|ƒ}	tj|d|ƒ}
|	|
fS(sL
        Returns pair of connection objects at either end of a pipe
        RiiRBRCN(R R
tPIPE_ACCESS_DUPLEXtGENERIC_READt
GENERIC_WRITEtBUFSIZEtPIPE_ACCESS_INBOUNDtCreateNamedPipetPIPE_TYPE_MESSAGEtPIPE_READMODE_MESSAGEt	PIPE_WAITtNMPWAIT_WAIT_FOREVERtNULLt
CreateFilet
OPEN_EXISTINGtSetNamedPipeHandleStateR+tConnectNamedPipetWindowsErrortargstERROR_PIPE_CONNECTEDRHtPipeConnection(RNR%topenmodetaccesstobsizetibsizeth1th2teRQRR((s0/usr/lib/python2.7/multiprocessing/connection.pyRÍs2			

$
R*cBs,eZdZdd„Zd„Zd„ZRS(sO
    Representation of a socket which is bound to an address and listening
    icCsötjtt|ƒƒ|_yb|jjtjtjdƒ|jjtƒ|jj|ƒ|jj	|ƒ|jj
ƒ|_Wn$tjk
r£|jj
ƒ‚nX||_d|_|dkrét|tjd|fddƒ|_n	d|_dS(NiRRetexitpriorityi(RDtgetattrt_sockett
setsockoptt
SOL_SOCKETtSO_REUSEADDRRFRGtbindtlistentgetsocknameR8terrorR
t_familyR+R:RRtunlinkt_unlink(R0R%RR1((s0/usr/lib/python2.7/multiprocessing/connection.pyR3ûs 
		$cCs›x\tr^y|jjƒ\}|_Wn2tjk
rY}|jdtjkr[‚q[qXPqW|j	tƒt
|jƒƒ}tj
|ƒ}|jƒ|S(Ni(RGRqR4R:RDRxReterrnotEINTRRFR	RKRHRIR
(R0tsRntfdtconn((s0/usr/lib/python2.7/multiprocessing/connection.pyR4s	


cCs-|jjƒ|jdk	r)|jƒndS(N(RqR
R{R+(R0((s0/usr/lib/python2.7/multiprocessing/connection.pyR
s
(R;R<R=R3R4R
(((s0/usr/lib/python2.7/multiprocessing/connection.pyR*÷s	cCséttt|ƒƒ}tƒ}x™tj|ƒ}|jtƒy|j|ƒWnbtjk
r²}|jƒ|j	dt
jkst|ƒr¢t
d|ƒ‚ntjdƒq!XPq!‚t|jƒƒ}tj|ƒ}|jƒ|S(sO
    Return a connection object connected to the socket given by `address`
    isfailed to connect to address %sg{®Gáz„?(RpRDR&RRFRGtconnectRxR
ReR|tECONNREFUSEDRRRtsleepR	RKRHRI(R%RRR~RnRR€((s0/usr/lib/python2.7/multiprocessing/connection.pyRA%s&	

"

R(cBs2eZdZdd„Zd„Zed„ƒZRS(s0
        Representation of a named pipe
        c	Cs ||_tj|tjtjtjBtjBtjtttj	tj
ƒ}|g|_d|_
td|jƒt|tjd|j|jfddƒ|_dS(Ns listener created with address=%rReRoi(R8R
RZRUR[R\R]tPIPE_UNLIMITED_INSTANCESRXR^R_t
_handle_queueR+R:RRR(t_finalize_pipe_listenerR
(R0R%R1thandle((s0/usr/lib/python2.7/multiprocessing/connection.pyR3Ks		
	c	CsÅtj|jtjtjtjBtjBtjtttj	tj
ƒ}|jj|ƒ|jj
dƒ}ytj|tj
ƒWn8tk
r·}|jdtjtjfkr¸‚q¸nXtj|ƒS(Ni(R
RZR8RUR[R\R]R„RXR^R_R…tappendtpopRcRdReRft
ERROR_NO_DATARHRg(R0t	newhandleR‡Rn((s0/usr/lib/python2.7/multiprocessing/connection.pyR4^s

cCs,td|ƒx|D]}t|ƒqWdS(Ns closing listener with address=%r(RR
(tqueueR%R‡((s0/usr/lib/python2.7/multiprocessing/connection.pyR†rs

N(R;R<R=R+R3R4tstaticmethodR†(((s0/usr/lib/python2.7/multiprocessing/connection.pyR(Gs	cCsÈtƒ}x–yHtj|dƒtj|tjtjBdtjtjdtjƒ}WnDtk
rš}|j	dtj
tjfks‘t|ƒrœ‚qœqXPq‚tj
|tjddƒtj|ƒS(sU
        Return a connection object connected to the pipe given by `address`
        ièiN(RR
t
WaitNamedPipeR`RVRWR_RaRdRetERROR_SEM_TIMEOUTtERROR_PIPE_BUSYRRbR\R+RHRg(R%RthRn((s0/usr/lib/python2.7/multiprocessing/connection.pyR@xs 	"
is#CHALLENGE#s	#WELCOME#s	#FAILURE#cCs¡ddl}t|tƒs!t‚tjtƒ}|jt|ƒ|j	||ƒj
ƒ}|jdƒ}||kr„|jtƒn|jt
ƒtdƒ‚dS(Niÿÿÿÿisdigest received was wrong(thmacR,R-tAssertionErrorRturandomtMESSAGE_LENGTHt
send_bytest	CHALLENGEtnewtdigestt
recv_bytestWELCOMEtFAILURER(t
connectionR2R’tmessageR™tresponse((s0/usr/lib/python2.7/multiprocessing/connection.pyR5œs
cCs¹ddl}t|tƒs!t‚|jdƒ}|ttƒ tksVtd|ƒ‚|ttƒ}|j||ƒjƒ}|j	|ƒ|jdƒ}|t
krµtdƒ‚ndS(Niÿÿÿÿismessage = %rsdigest sent was rejected(R’R,R-R“RštlenR—R˜R™R–R›R(RR2R’RžR™RŸ((s0/usr/lib/python2.7/multiprocessing/connection.pyR6©s&
tConnectionWrappercBs#eZd„Zd„Zd„ZRS(cCsO||_||_||_x-dD]%}t||ƒ}t|||ƒq"WdS(NRKR
tpollRšR–(sfilenoscloseR¢s
recv_bytess
send_bytes(t_connt_dumpst_loadsRptsetattr(R0R€tdumpstloadstattrtobj((s0/usr/lib/python2.7/multiprocessing/connection.pyR3ºs			
cCs#|j|ƒ}|jj|ƒdS(N(R¤R£R–(R0RªR~((s0/usr/lib/python2.7/multiprocessing/connection.pytsendÁscCs|jjƒ}|j|ƒS(N(R£RšR¥(R0R~((s0/usr/lib/python2.7/multiprocessing/connection.pytrecvÄs(R;R<R3R«R¬(((s0/usr/lib/python2.7/multiprocessing/connection.pyR¡¹s		cCs%tj|fddddƒjdƒS(Nitutf8(t	xmlrpclibR§R+tencode(Rª((s0/usr/lib/python2.7/multiprocessing/connection.pyt
_xml_dumpsÈscCs%tj|jdƒƒ\\}}|S(NR­(R®R¨tdecode(R~Rªtmethod((s0/usr/lib/python2.7/multiprocessing/connection.pyt
_xml_loadsËs!tXmlListenercBseZd„ZRS(cCs+ddlatj|ƒ}t|ttƒS(Niÿÿÿÿ(R®RR4R¡R°R³(R0Rª((s0/usr/lib/python2.7/multiprocessing/connection.pyR4Ðs(R;R<R4(((s0/usr/lib/python2.7/multiprocessing/connection.pyR´ÏscOs%ddlatt||ŽttƒS(Niÿÿÿÿ(R®R¡RR°R³(Retkwds((s0/usr/lib/python2.7/multiprocessing/connection.pyt	XmlClientÖs(6t__all__RtsysRDR|RRt	itertoolsRHtmultiprocessingRRtmultiprocessing.utilRRRRtmultiprocessing.forkingR	R
RXtCONNECTION_TIMEOUTtcountRR'tfamiliesthasattrtplatformRRR R&tobjectRR+RRGRR
R*RAR(R@R•R—R›RœR5R6R¡R°R³R´R¶(((s0/usr/lib/python2.7/multiprocessing/connection.pyt<module>#s`"				,*.	 1	
			

Copyright © 2017 || Recoded By Mr.Bumblebee