KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21572/root/usr/lib64/python2.4/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib64/python2.4/socket.pyo
mò
‚=5Dc@s7dZdkZdkTeZydkZdkTeZWnej
onXdkZdkZydk	l
Z
Wnej
o
dZ
nXdgZeiei
eƒƒeoeiei
eƒƒneZeoeZddd„Zneiiƒidƒo­hZded	<d
ed<ded
<ded<ded<ded<ded<ded<ded<ded<ded<ded<d ed!<d"ed#<d$ed%<eid&ƒnd'd(„Zd?Zeid7joed@Znd9efd:„ƒYZd;efd<„ƒYZeZZd=efd>„ƒYZdS(As”This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available as methods of the socket object.

Functions:

socket() -- create a new socket object
socketpair() -- create a pair of new socket objects [*]
fromfd() -- create a socket object from an open file descriptor [*]
gethostname() -- return the current hostname
gethostbyname() -- map a hostname to its IP number
gethostbyaddr() -- map an IP number or hostname to DNS info
getservbyname() -- map a service name and a protocol name to a port number
getprotobyname() -- mape a protocol name (e.g. 'tcp') to a number
ntohs(), ntohl() -- convert 16, 32 bit int from network to host byte order
htons(), htonl() -- convert 16, 32 bit int from host to network byte order
inet_aton() -- convert IP addr string (123.45.67.89) to 32-bit packed format
inet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89)
ssl() -- secure socket layer support (only available if configured)
socket.getdefaulttimeout() -- get the default timeout value
socket.setdefaulttimeout() -- set the default timeout value

 [*] not available on all platforms!

Special objects:

SocketType -- type object for socket objects
error -- exception raised for I/O errors
has_ipv6 -- boolean value indicating if IPv6 is supported

Integer constants:

AF_INET, AF_UNIX -- socket domains (first argument to socket() call)
SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument)

Many other constants may be defined; these may be used in calls to
the setsockopt() and getsockopt() methods.
N(t*(sEBADFi	tgetfqdncCs-t|dƒo
|i}nt|||ƒS(Nt_sock(thasattrtsockRt_realssltkeyfiletcertfile(RRR((t/usr/lib64/python2.4/socket.pytsslGs
twinsThe operation was interrupted.i'sA bad file handle was passed.i'sPermission denied.i's!A fault occurred on the network??i's#An invalid operation was attempted.i&'s The socket operation would blocki3's,A blocking operation is already in progress.i4'sThe network address is in use.i@'sThe connection has been reset.iF'sThe network has been shut down.iJ'sThe operation timed out.iL'sConnection refused.iM'sThe name is too long.iO'sThe host is down.iP'sThe host is unreachable.iQ'terrorTabtcCsš|iƒ}|p
|djo
tƒ}nyt|ƒ\}}}Wntj
on;X|id|ƒx&|D]}d|joPqtqtW|}|S(s)Get fully qualified domain name from name.

    An empty argument is interpreted as meaning the local host.

    First the hostname returned by gethostbyaddr() is checked, then
    possibly existing aliases. In case no FQDN is available, hostname
    as returned by gethostname() is returned.
    s0.0.0.0it.N(	tnametstriptgethostnamet
gethostbyaddrthostnametaliasestipaddrsterrortinsert(RRRR((RRbs

	tbindtconnectt
connect_extfilenotlistentgetpeernametgetsocknamet
getsockoptt
setsockopttsendalltsetblockingt
settimeoutt
gettimeouttshutdowntriscost
sleeptaskwt
_closedsocketcBs-tZgZd„ZeZZZZZRS(NcGsttdƒ‚dS(NsBad file descriptor(RtEBADF(targs((Rt_dummys(	t__name__t
__module__t	__slots__R*tsendtrecvtsendtotrecvfromt__getattr__(((RR's	t
_socketobjectcBs»tZeiZddddddgZeeddd„Zd	„Z	ei	ie	_d
„Z
ei
ie
_d„Zdd
d„ZdZ
x&eD]Ze
eeeefdUq‘W[[
RS(NRR.R/R0R1t__weakref__icCsl|djot|||ƒ}n||_|ii|_|ii|_|ii	|_	|ii
|_
dS(N(RtNonet_realsockettfamilyttypetprototselfR.R/R0R1(R:R7R8R9R((Rt__init__šs
	cCs4tƒ|_|ii|_|_|_|_dS(N(R'R:RR*R.R/R0R1(R:((Rtclose£scCs(|iiƒ\}}td|ƒ|fS(NR(R:RtacceptRtaddrR3(R:RR>((RR=¨scCstd|iƒS(sadup() -> socket object

        Return a new socket object connected to the same system resource.RN(R3R:R(R:((Rtdup­striÿÿÿÿcCst|i||ƒS(s¾makefile([mode[, bufsize]]) -> file object

        Return a regular file object corresponding to the socket.  The mode
        and bufsize arguments are as for the built-in open() function.N(t_fileobjectR:Rtmodetbufsize(R:RBRC((Rtmakefile³ssVdef %s(self, *args): return self._sock.%s(*args)

%s.__doc__ = _realsocket.%s.__doc__
(R+R,R6t__doc__R-tAF_INETtSOCK_STREAMR5R;R<R=R?RDt_st_socketmethodst_m(((RR3“s					RAcBs×tZdZdZdZddddddd	d
gZddd
„Zd„ZeeddƒZ	d„Z
d„Zd„Zd„Z
d„Zd„Zd„Zdd„Zdd„Zdd„Zd„Zd„ZRS(s-Faux file object attached to a socket object.i s<socket>RBRCt	softspaceRt	_rbufsizet	_wbufsizet_rbuft_wbuftrbiÿÿÿÿcCs||_||_|djo
|i}n||_t|_|djo
d|_n'|djo|i|_n
||_||_	d|_
g|_dS(NiiR(RR:RRBRCtdefault_bufsizetFalseRKRLRMRNRO(R:RRBRC((RR;Ìs		

		


			cCs
|idjS(N(R:RR5(R:((Rt
_getclosedÝstdocsTrue if the file is closedcCs-z|io|iƒnWdd|_XdS(N(R:RtflushR5(R:((RR<ás

cCsy|iƒWnnXdS(N(R:R<(R:((Rt__del__èscCs=|io/di|iƒ}g|_|ii|ƒndS(NR(R:ROtjointbufferRR (R:RX((RRUïs
	cCs
|iiƒS(N(R:RR(R:((RRõscCs€t|ƒ}|pdSn|ii|ƒ|idjp3|idjo
d|jp|iƒ|ijo|iƒndS(Niis
(tstrtdataR:ROtappendRMt
_get_wbuf_lenRU(R:RZ((RtwriteøsCcCsZ|i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<RVRURR]RbR\RmRpRtRuRw(((RRAÂs&						
		+G	(RRRsfilenoRRRRRssendallR!R"R#R$(R&(REt_socketRRt	_have_sslt_sslRitImportErrortostsysterrnoR(t__all__R^t_get_exports_listtsocketR6R	RR5tplatformtlowert
startswithRR[RRItobjectR'R3t
SocketTypeRA(RˆRR3RR(RRzRR{RIR|RR	R6RƒR'RAR~((Rt?+s`		
	














"-


Anon7 - 2021