python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
socket.cpython-312.pyc

ˑedZddlZddlddlZddlZddlZddlZddlmZmZ	ddl	Z	ee	ddZee	ddZ
ee	d	dZgd
Zej!ej"eej$dedej$d
edej$dedej$deddZdZdZej.j1j3driZded<ded<ded<ded<ded <d!ed"<d#ed$<d%ed&<d'ed(<d)ed*<d+ed,<d-ed.<d/ed0<d1ed2<d3ed4<d5ed6<d7ed8<d9ed:<d;ed<<d=ed><d?ed@<dAedB<dCedD<dEedF<dGedH<dIedJ<dKedL<dMedN<dOedP<dQedR<dSedT<dUedV<dWedX<dYedZ<d[ed\<d]ed^<d_ed`<daedb<dcedd<deedf<dgedh<diedj<dkedl<dmedn<doedp<dqedr<dsedt<duedv<dwedx<dyedz<d{ed|<d}ed~<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ded<ej7dӫGdԄdeZGdքdej<Zdd؄Ze ej<d٫rddl!Z!ddڄZ"ej7d۫e ej<dܫrddl!Z!dd݄Z#ej7dޫe ej<d߫rdZ$ej7de edrde%dfdZ&ne'e%dfdZ&ej7dde&_e
ehZ(GddejRZ*ddZ+e,Z-e-dfdddZ.dZ/e'dddddZ0ddZ1y#e
$rdZ	YwxYw)aThis 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 [*]
send_fds() -- Send file descriptor to the socket.
recv_fds() -- Receive file descriptors from the socket.
fromshare() -- create a socket object from data received from socket.share() [*]
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() -- map 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)
socket.getdefaulttimeout() -- get the default timeout value
socket.setdefaulttimeout() -- set the default timeout value
create_connection() -- connects to an address, with an optional timeout and
                       optional source address.
create_server() -- create a TCP socket and bind it to a specified address.

 [*] 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

IntEnum constants:

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

Integer constants:

Many other constants may be defined; these may be used in calls to
the setsockopt() and getsockopt() methods.
N)*)IntEnumIntFlagEBADF	EAGAINEWOULDBLOCK)fromfdgetfqdncreate_connection
create_serverhas_dualstack_ipv6
AddressFamily
SocketKindrcH|jxr|jdS)NAF_isupper
startswithCs :/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/socket.py<lambda>rO!))+5!,,u"5rcH|jxr|jdS)NSOCK_rrs rrrTs!))+7!,,w"7rMsgFlagcH|jxr|jdS)NMSG_rrs rrrYs!))+6!,,v"6rAddressInfocH|jxr|jdS)NAI_rrs rrr^rrz	127.0.0.1z::1c6	||S#t$r|cYSwxYw)z{Convert a numeric family value to an IntEnum member.

    If it's not a known member, return the numeric value itself.
    )
ValueError)value
enum_klasss  r_intenum_converterr)ds&
%  s
winz)Specified event object handle is invalid.zInsufficient memory available.z#One or more parameters are invalid.WzOverlapped operation aborted.iz2Overlapped I/O event object not in signaled state.iz)Overlapped operation will complete later.izThe operation was interrupted.i'zA bad file handle was passed.i'zPermission denied.i'z!A fault occurred on the network??i'z#An invalid operation was attempted.i&'zToo many open files.i('z!The socket operation would block.i3'z,A blocking operation is already in progress.i4'zOperation already in progress.i5'zSocket operation on nonsocket.i6'zDestination address required.i7'zMessage too long.i8'zProtocol wrong type for socket.i9'zBad protocol option.i:'zProtocol not supported.i;'zSocket type not supported.i<'zOperation not supported.i='zProtocol family not supported.i>'z0Address family not supported by protocol family.i?'zThe network address is in use.i@'z Cannot assign requested address.iA'zNetwork is down.iB'zNetwork is unreachable.iC'z$Network dropped connection on reset.iD'z!Software caused connection abort.iE'zThe connection has been reset.iF'zNo buffer space available.iG'zSocket is already connected.iH'zSocket is not connected.iI'zThe network has been shut down.iJ'zToo many references.iK'zThe operation timed out.iL'zConnection refused.iM'zCannot translate name.iN'zThe name is too long.iO'zThe host is down.iP'zThe host is unreachable.iQ'zDirectory not empty.iR'zToo many processes.iS'zUser quota exceeded.iT'zDisk quota exceeded.iU'zStale file handle reference.iV'zItem is remote.iW'z!Network subsystem is unavailable.ik'z!Winsock.dll version out of range.il'z(Successful WSAStartup not yet performed.im'zGraceful shutdown in progress.iu'z*No more results from WSALookupServiceNext.iv'zCall has been canceled.iw'z Procedure call table is invalid.ix'zService provider is invalid.iy'z&Service provider failed to initialize.iz'zSystem call failure.i{'zService not found.i|'zClass type not found.i}'i~'zCall was canceled.i'zDatabase query was refused.i'zHost not found.i*z Nonauthoritative host not found.i*zThis is a nonrecoverable error.i*z*Valid name, no data record requested type.i*zQoS receivers.i*zQoS senders.i*zNo QoS senders.i*zQoS no receivers.i+zQoS request confirmed.i+zQoS admission error.i+zQoS policy failure.i+zQoS bad style.i+zQoS bad object.i+zQoS traffic control error.i+zQoS generic error.i+zQoS service type error.i+zQoS flowspec error.i	+zInvalid QoS provider buffer.i
+zInvalid QoS filter style.i+i+zIncorrect QoS filter count.i
+zInvalid QoS object length.i+zIncorrect QoS flow count.i+zUnrecognized QoS object.i+zInvalid QoS policy object.i+zInvalid QoS flow descriptor.i+z'Invalid QoS provider-specific flowspec.i+z)Invalid QoS provider-specific filterspec.i+z&Invalid QoS shape discard mode object.i+z Invalid QoS shaping rate object.i+z!Reserved policy QoS element type.i+errorTabceZdZy)_GiveupOnSendfileN)__name__
__module____qualname__rrr0r0srr0cHeZdZdZgdZd dZdZdZdZdZ	d	Z
d
Zd!dddddZe
ed
rd"dZnd"dZd"dZdZd"dZdZej*fdZdZfdZefdZefdZej8dk(rdZdZndZdZde_de_xZS)#socketz:A subclass of _socket.socket adding the makefile() method.)__weakref___io_refs_closedNc||dk(rt}|dk(rt}|dk(rd}tjj	|||||d|_d|_y)NrF)AF_INETSOCK_STREAM_socketr6__init__r8r9)selffamilytypeprotofilenos     rr?zsocket.__init__sU
>| rz"{fdE6B
rc|SNr4r@s r	__enter__zsocket.__enter__src>|js|jyyrF)r9close)r@argss  r__exit__zsocket.__exit__s||JJLrct|dd}d|jj|jj|rdnd|j	|j
|j|jfz}|sH	|j}|r|dt|zz
}	|j}|r|dt|zz
}|dz
}|S#ttf$rY<wxYw#ttf$rY-wxYw)	zVWrap __repr__() to reveal the real class name and socket
        address(es).
        r9Fz,<%s.%s%s fd=%i, family=%s, type=%s, proto=%iz	 [closed]z
, laddr=%sz
, raddr=%s>)
getattr	__class__r2r3rDrArBrCgetsocknamestrerrorAttributeErrorgetpeername)r@closedsladdrraddrs     r__repr__zsocket.__repr__sy%0:~~((~~**${"{{}{{yyzz


((*E
22A
((*E
22A	
S>*

>*

s$5#C#CCCC*)C*cHtd|jjd)Nzcannot pickle z object)	TypeErrorrQr1rGs r__getstate__zsocket.__getstate__s!.)@)@(C7KLLrct|j}|j|j|j|j
|}|j
|j|S)zdup() -> socket object

        Duplicate the socket. Return a new socket object connected to the same
        system resource. The new socket is non-inheritable.
        rD)duprDrQrArBrC
settimeout
gettimeout)r@fdsocks   rraz
socket.dupsN
~~dkk499djj~L)*rc|j\}}t|j|j|j|}t!|j
r|jd||fS)zaccept() -> (socket object, address info)

        Wait for an incoming connection.  Return a new socket
        representing the connection, and the address of the client.
        For IP sockets, the address info is a pair (hostaddr, port).
        r`T)_acceptr6rArBrCgetdefaulttimeoutrcsetblocking)r@rdaddrres    racceptz
socket.accept s[<<>Ddkk499djjD&4??+<T"Tzr)encodingerrorsnewlinec<t|hdkstd|dd|v}d|vxs|}|s|sJd|v}d}	|r|	dz
}	|r|	dz
}	t||	}
|xjdz
c_|d	}|d
krtj
}|d
k(r|std|
S|r|rt	j|
|
|}n3|rt	j|
|}n|sJt	j|
|}|r|St	j|}t	j||||}||_|S)zmakefile(...) -> an I/O stream connected to the socket

        The arguments are as for io.open() after the filename, except the only
        supported mode values are 'r' (default), 'w' and 'b'.
        >brwz
invalid mode z (only r, w, b allowed)rrrqrprNr;rz!unbuffered streams must be binary)setr&SocketIOr8ioDEFAULT_BUFFER_SIZEBufferedRWPairBufferedReaderBufferedWriter
text_encoding
TextIOWrappermode)
r@r}	bufferingrlrmrnwritingreadingbinaryrawmoderawbuffertexts
             rmakefilezsocket.makefile0s64yO+OPP++,W'!sNGsNGtW%


Iq=..I> !DEEJw&&sC;F
&&sI6FN&&sI6FM##H-&'B	rsendfilec|j||||j}	|j}	t
j|j}|syt|xs|d}|j}	|	dk(rtdttdrtj}
ntj }
|
j#|tj$d}|
j&}tj(}
		|	r||	st+d|r||z
}|dkrn	|
||||}|dk(rn||z
}||z
}?||dkDrt|dr|j/|SSS#ttjf$r}t|d}~wwxYw#t$r}t|d}~wwxYw#t,$r|	s|Yt$r}|dk(rt||dd}~wwxYw#|dkDrt|dr|j/|wwwxYw)Nri@&non-blocking sockets are not supportedPollSelectorz	timed outseek)_check_sendfile_paramsrDrUrvUnsupportedOperationr0osfstatst_sizeOSErrorminrcr&hasattr	selectorsrSelectSelectorregisterEVENT_WRITEselectrTimeoutErrorBlockingIOErrorr)r@fileoffsetcountsocknorDerrfsize	blocksizetimeoutselector
total_sentselector_selectos_sendfilesents               r_sendfile_use_sendfilezsocket._sendfile_use_sendfile]s''fe<[[]F
-
-(00ENUG4Ioo'G!| !IJJy.1$113$335fi&;&;<J&ooO++K 
&w'?*;77$)J$6	$>!+*6669M  19!$"d*
78">gdF&;IIf%'<>s#B$;$;<
-',,
-
-',,
-@+!&,- ",%?
#4C"88!t+,>gdF&;IIf%'<>sjE&F#G%$F./G%&F?F

F	F+F&&F+.G"G%G"
GG""G%%&Hctd)Nz,os.sendfile() not available on this platform)r0r@rrrs    rrzsocket._sendfile_use_sendfiles#>@
@rcL|j||||jdk(rtd|r|j||rt	|dnd}d}|j
}|j}		|rt	||z
|}|dkrn:t||}|sn&		||}	||	z
}|	t|kr||	d}nn$Q||dkDr"t|dr|j||zSSS#t$rYZwxYw#|dkDr"t|dr|j||zwwwxYw)Nrri r)rrcr&rrreadsend
memoryviewlenrr)
r@rrrrr	file_read	sock_senddatars
          r_sendfile_use_sendzsocket._sendfile_use_sendsM##D&%8??!EFFIIf(-Ct$4	
II	II		/ #EJ$6	 BI A~!)I"67	"(#d*
#d)+#';D!&A~'$"7		&:-.#8~+! !A~'$"7		&:-.#8~s00-C:C+&C:+	C74C:6C77C::)D#cdt|ddvrtd|jtzstd|Jt	|t
st
dj||dkrtdj|yy)Nrpr}z$file should be opened in binary modez+only SOCK_STREAM type sockets are supportedz+count must be a positive integer (got {!r})r)rPr&rBr=
isinstanceintr]formatrs    rrzsocket._check_sendfile_paramssgdFC00CDDyy;&JKKeS)AHHOQQz AHHOQQ	rcn	|j|||S#t$r|j|||cYSwxYw)a_sendfile(file[, offset[, count]]) -> sent

        Send a file until EOF is reached by using high-performance
        os.sendfile() and return the total number of bytes which
        were sent.
        *file* must be a regular file object opened in binary mode.
        If os.sendfile() is not available (e.g. Windows) or file is
        not a regular file socket.send() will be used instead.
        *offset* tells from where to start reading the file.
        If specified, *count* is the total number of bytes to transmit
        as opposed to sending the file until EOF is reached.
        File position is updated on return or also in case of error in
        which case file.tell() can be used to figure out the number of
        bytes which were sent.
        The socket must be of SOCK_STREAM type.
        Non-blocking sockets are not supported.
        )rr0rrs    rrzsocket.sendfilesC$	@..tVUCC 	@**4??	@s44c|jdkDr|xjdzc_|jr|jyy)Nrrs)r8r9rJrGs r_decref_socketioszsocket._decref_socketioss1==1MMQM<<JJLrc&|j|yrF)rJ)r@_sss  r_real_closezsocket._real_closes
		$rcRd|_|jdkr|jyy)NTr)r9r8rrGs rrJzsocket.closes&==Arc.d|_t|	S)adetach() -> file descriptor

        Close the socket object without closing the underlying file descriptor.
        The object cannot be used after this call, but the file descriptor
        can be reused for other purposes.  The file descriptor is returned.
        T)r9superdetachr@rQs rrz
socket.detachsw~rc4tt|tS)z@Read-only access to the address family for this socket.
        )r)rrArrs rrAz
socket.familys"%'.-@@rc4tt|tS)z-Read-only access to the socket type.
        )r)rrBrrs rrBzsocket.type
s"%',
;;rntcHtj|jSrF)rget_handle_inheritablerDrGs rget_inheritablezsocket.get_inheritables,,T[[];;rcLtj|j|yrF)rset_handle_inheritablerDr@inheritables  rset_inheritablezsocket.set_inheritables%%dkkm[ArcHtj|jSrF)rrrDrGs rrzsocket.get_inheritables%%dkkm44rcLtj|j|yrF)rrrDrs  rrzsocket.set_inheritablest{{}k:rz&Get the inheritable flag of the socketz&Set the inheritable flag of the socket)r;r;r;N)rqNrN) r1r2r3__doc__	__slots__r?rHrLr[r^rarkrrrrrrrrr>r6rrJrpropertyrArBnamerr
__classcell__rQs@rr6r6sD6I <M	 )tT)Vr:?	&B	@"/HQ@.&nn AA
<<

ww$	<	B	5	;FOFOrr6c4t|}t||||S)z fromfd(fd, family, type[, proto]) -> socket object

    Create a socket object from a duplicate of the given file
    descriptor.  The remaining arguments are the same as for socket().
    )rar6)rdrArBrCnfds     rrrsb'C&$s++rsendmsgc	|j|tjtjt	jd|fgS)z send_fds(sock, buffers, fds[, flags[, address]]) -> integer

        Send the list of file descriptors fds over an AF_UNIX socket.
        i)rr>
SOL_SOCKET
SCM_RIGHTSarray)rebuffersfdsflagsaddresss     rsend_fdsr)s?
||Gw'9'9C 5'7&89	9rrrecvmsgc	tjd}|j|tj||jz\}}}}|D]d\}}	}
|tj
k(s|	tjk(s/|j|
dt|
t|
|jzz
f|t|||fS)z recv_fds(sock, bufsize, maxfds[, flags]) -> (data, list of file
        descriptors, msg_flags, address)

        Receive up to maxfds file descriptors returning the message
        data and a list containing the descriptors.
        rN)
rrr>CMSG_LENitemsizerr	frombytesrlist)rebufsizemaxfdsrrmsgancdatarj
cmsg_level	cmsg_type	cmsg_datas           rrecv_fdsr5skk#$(LLVcll23%5!WeT07	K,J	9g000Y'BTBT5T

i)II#i.3<<*GHJK	K
DIud**rrsharectddd|S)z fromshare(info) -> socket object

        Create a socket object from the bytes object returned by
        socket.share(pid).
        r)r6)infos r	fromsharerIsaAt$$rr
socketpairc|	t}tj|||\}}t||||j
}t||||j
}||fS#t$r	t}YgwxYw)aasocketpair([family[, type[, proto]]]) -> (socket object, socket object)

        Create a pair of socket objects from the sockets returned by the platform
        socketpair() function.
        The arguments are the same as for socket() except the default family is
        AF_UNIX if defined on the platform; otherwise, the default is AF_INET.
        )AF_UNIX	NameErrorr<r>rr6r)rArBrCarps     rrrTsx>
! !!&$6164
364
3!t
! 
!sA  A21A2c|tk(rt}n|tk(rt}nt	d|t
k7rt	d|dk7rt	dt
|||}	|j|df|j|jdd\}}t
|||}	|jd	|j||f|jd|j\}}		|j||fS#ttf$rYJwxYw#|jxYw#|jwxYw)Nz?Only AF_INET and AF_INET6 socket address families are supportedz)Only SOCK_STREAM socket type is supportedrzOnly protocol zero is supportedFT)r<
_LOCALHOSTAF_INET6
_LOCALHOST_V6r&r=r6bindlistenrRriconnectrInterruptedErrorrkrJ)
rArBrChostlsockrjportcsockssock_s
          rrris<WD
x
 D-.
.;HIIA:>??vtU+	JJay!LLN**,Ra0JD$64/E

!!%(MM4,/!!$' <<>q

KKMu~()9:

KKMsCAD.%D7D
$DDDDDD++D..Ea8socketpair([family[, type[, proto]]]) -> (socket object, socket object)
Create a pair of socket objects from the sockets returned by the platform
socketpair() function.
The arguments are the same as for socket() except the default family is AF_UNIX
if defined on the platform; otherwise, the default is AF_INET.
cleZdZdZdZdZdZdZdZfdZ	dZ
ed	Zed
Z
dZxZS)ruzRaw I/O implementation for stream sockets.

    This class supports the makefile() method on sockets.  It provides
    the raw I/O interface on top of a socket object.
    c|dvrtd|ztjj|||_d|vr|dz
}||_d|v|_d|v|_d|_y)N)rqrrrwrbwbrwbzinvalid mode: %rrprqrrF)	r&rv	RawIOBaser?_sock_mode_reading_writing_timeout_occurred)r@rer}s   rr?zSocketIO.__init__sj::/$677
d#
d?CKD
t
t
!&rc|j|j|jrtd		|jj|S#t$r	d|_t$r}|jtvrYd}~yd}~wwxYw)a3Read up to len(b) bytes into the writable buffer *b* and return
        the number of bytes read.  If the socket is non-blocking and no bytes
        are available, None is returned.

        If *b* is non-empty, a 0 return value indicates that the connection
        was shutdown at the other end.
        z!cannot read from timed out objectTN)
_checkClosed_checkReadablerrr	recv_intorrTerrno_blocking_errnosr@rpes   rreadintozSocketIO.readintos	
!!=>>
zz++A..
)-&
77..
sAB.BBBc|j|j	|jj|S#t$r}|j
tvrYd}~yd}~wwxYw)aWrite the given bytes or bytearray object *b* to the socket
        and return the number of bytes written.  This can be less than
        len(b) if not all data could be written.  If the socket is
        non-blocking and no bytes could be written None is returned.
        N)r_checkWritablerrrTrrrs   rwritezSocketIO.writesW	
	::??1%%	ww**		s=	A#AAA#cH|jrtd|jS)z2True if the SocketIO is open for reading.
        I/O operation on closed socket.)rWr&rrGs rreadablezSocketIO.readable!;;>??}}rcH|jrtd|jS)z2True if the SocketIO is open for writing.
        r#)rWr&rrGs rwritablezSocketIO.writabler%rcN|jrtdt|
S)z2True if the SocketIO is open for seeking.
        r#)rWr&rseekablers rr)zSocketIO.seekables&;;>??w!!rcV|j|jjS)z=Return the file descriptor of the underlying socket.
        )rrrDrGs rrDzSocketIO.filenos#	
zz  ""rc<|js|jSy)Nr;)rWrDrGs rrz
SocketIO.names{{;;= rc|jSrF)rrGs rr}z
SocketIO.modeszzrc|jrytjj||jjd|_y)zClose the SocketIO object.  This doesn't close the underlying
        socket, except if all references to it have disappeared.
        N)rWrvrrJrrrGs rrJzSocketIO.closes7;;
4 

$$&
r)r1r2r3rr?rr!r$r'r)rDrrr}rJrrs@rrurusX
'. "#rruc|j}|r|dvr
t}	t|\}}}|jd||D]	}d|vs|S|}|S#t$rY|SwxYw)azGet 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 and `name`
    was given, it is returned unchanged. If `name` was empty, '0.0.0.0' or '::',
    hostname from gethostname() is returned.
    )z0.0.0.0z::r.)stripgethostname
gethostbyaddrinsertrT)rhostnamealiasesipaddrss    rrr
s::<D4,,}
%24%8"'7	q(#	Dd{K	DK
K
sA	A"!A"F)
all_errorsc"|\}}g}t||dtD]j}|\}}	}
}}d}
	t||	|
}
|tur|
j	||r|
j||
j
||j|
cSt|r	|s|dtd|td#t$r?}|s|j|j||
|
jYd}~d}~wwxYw#|jwxYw)aConnect to *address* and return the socket object.

    Convenience function.  Connect to *address* (a 2-tuple ``(host,
    port)``) and return the socket object.  Passing the optional
    *timeout* parameter will set the timeout on the socket instance
    before attempting to connect.  If no *timeout* is supplied, the
    global default timeout setting returned by :func:`getdefaulttimeout`
    is used.  If *source_address* is set it must be a tuple of (host, port)
    for the socket to bind as a source address before making the connection.
    A host of '' or port 0 tells the OS to use the default. When a connection
    cannot be created, raises the last error if *all_errors* is False,
    and an ExceptionGroup of all errors if *all_errors* is True.
    rNzcreate_connection failedz!getaddrinfo returns an empty list)
getaddrinfor=r6_GLOBAL_DEFAULT_TIMEOUTrbrrclearrTappendrJrExceptionGroup)rrsource_addressr7rr
exceptionsresafsocktyperC	canonnamesareexcs               rr
r
*s JD$J4q+6-0*HeY	"h.D55(		.)LLK*:	 m# !;ZHH
788!	  "c"

	
s$AB1C<1	C9:5C44C9<Dctr ttdrttdsy	ttt
5}|j
ttd	dddy#1swYyxYw#t$rYywxYw)zReturn True if the platform supports creating a SOCK_STREAM socket
    which can handle both AF_INET and AF_INET6 (IPv4 / IPv6) connections.
    IPPROTO_IPV6IPV6_V6ONLYFrNT)
has_ipv6rr>r6rr=
setsockoptrGrHrT)res rrr]sj7N37M2
Hk
*	dOOL+q9			s.A/A#A/#A,(A/,A//	A;:A;)rAbacklog
reuse_portdualstack_ipv6cz|rttdstd|r)tstd|tk7rtdt|t}	tjdvr,ttdr	|jttd|r|jttdtrb|tk(rY|r|jtt dn;ttd	r+ttd
r|jtt d	|j#|||j)|S|j)||S#t$rYwxYw#t$r.}|j$d|d}t|j&|d
d
}~wwxYw#t$r|j+wxYw)aConvenience function which creates a SOCK_STREAM type socket
    bound to *address* (a 2-tuple (host, port)) and return the socket
    object.

    *family* should be either AF_INET or AF_INET6.
    *backlog* is the queue size passed to socket.listen().
    *reuse_port* dictates whether to use the SO_REUSEPORT socket option.
    *dualstack_ipv6*: if true and the platform supports it, it will
    create an AF_INET6 socket able to accept both IPv4 or IPv6
    connections. When false it will explicitly disable this option on
    platforms that enable it by default (e.g. Linux).

    >>> with create_server(('', 8000)) as server:
    ...     while True:
    ...         conn, addr = server.accept()
    ...         # handle new connection
    SO_REUSEPORTz+SO_REUSEPORT not supported on this platformz-dualstack_ipv6 not supported on this platformz'dualstack_ipv6 requires AF_INET6 family)rcygwinSO_REUSEADDRrsrrHrGz& (while attempting to bind on address )N)rr>r&rrr6r=rrrJrrQrTrOrIrGrHrstrerrorrrrJ)rrArKrLrMrerrs        rrrms{&''>:FGG!#LMMXFGG&+&D'77**0

L!<
OOJa8(*k1=-0G^4k1=	2IIg
?KKM
KK -

	2w(C		3'T1	2


s["F=EBFE%/FF	E"F!E""F%	F.)FFFF:cg}tj||||||D]<}|\}}	}}
}|jt|tt|	t
||
|f>|S)aResolve host and port into list of address info entries.

    Translate the host/port argument into a sequence of 5-tuples that contain
    all the necessary arguments for creating a socket connected to that service.
    host is a domain name, a string representation of an IPv4/v6 address or
    None. port is a string service name such as 'http', a numeric port number or
    None. By passing None as the value of host and port, you can pass NULL to
    the underlying C API.

    The family, type and proto arguments can be optionally specified in order to
    narrow the list of addresses returned. Passing zero as a value for each of
    these arguments selects the full range of results.
    )r>r9r<r)rr)rrrArBrCraddrlistr@rArBrCrDs            rr9r9sp H""4vtUEJ0-0*HeY+B
>+HjA	2/	00
Or)rr)rN)rrrr)2rr>rsysrvrenumrrrImportErrorrPrrr
__all__extend_get_exports_list	_convert_r1rrr)platformlowerrr.r<	Exceptionr0r6rrrrrrr=rr<rrrurobjectr:r
rrr9r4rr<module>ras.`!	w"	"	%e]B/@#r##G,-57
79
68
57


<<""5)H=HQK2HQK8HRL3HSMHHSM?HSM6HUO5HUO*HUO9HUO;HUO,HUO9HUODHUO6HUO6HUO5HUO)HUO7HUO,HUO/HUO2HUO0HUO6HUOHHUO6HUO8HUO(HUO/HUO<HUO9HUO6HUO2HUO4HUO0HUO7HUO,HUO0HUO+HUO.HUO-HUO)HUO0HUO,HUO+HUO,HUO,HUO4HUO'HUO9HUO9HUO@HUO6HUOBHUO/HUO8HUO4HUO>HUO,HUO*HUO-HUOBHUO*HUO3HUO'HUO8HUO7HUOBHUO&HUO$HUO'HUO)HUO.HUO,HUO+HUO&HUO'HUO2HUO*HUO/HUO+HUO4HUO1HUO1HUO3HUO2HUO1HUO0HUO2HUO4HUO?HUOAHUO>HUO8HUO9HUONN:)	(DGW^^DGL
,7>>9%9NN:
7>>9%+"NN:
7>>7#%NN;
7L![*"1#HNN< 
[*rr||rj6!('>%)099>09f
 &-du!&BJmEsO00O;:O;