Your IP : 3.135.241.191


Current Path : /usr/lib64/python3.8/__pycache__/
Upload File :
Current File : //usr/lib64/python3.8/__pycache__/socket.cpython-38.opt-1.pyc

U

e5d���@sdZddlZddlTddlZddlZddlZddlZddlmZmZzddl	Z	Wne
k
rhdZ	YnXee	dd�Zee	dd�Z
ee	d	d�Zd
ddd
dddgZe�e�e��e�dedd��e�dedd��e�dedd��e�dedd��dZdZdd�ZeZej���d��r$iZded<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�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<d�ed�<e�d١Gd�dۄd�e�ZGd�d݄d�ej�Zd�d�d
�Z e!ejd߃�rpd�d�Z"e�d�e!ed��r�de#dfd�d�Z$ne%e#dfd�d�Z$e�d�d�e$_e
ehZ&Gd�d�d�ej'�Z(d�d�d�Z)e*�Z+e+dfd�d�Z,d�d�Z-e%dd�d�d�d�d
�Z.d�d�d�Z/dS)�a0This 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 [*]
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.

 [*] 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)�*)�IntEnum�IntFlag�EBADF�	�EAGAIN��EWOULDBLOCK�fromfd�getfqdn�create_connection�
create_server�has_dualstack_ipv6�
AddressFamily�
SocketKindcCs|��o|�d�S)NZAF_��isupper�
startswith��C�r�/usr/lib64/python3.8/socket.py�<lambda>L�rcCs|��o|�d�S)NZSOCK_rrrrrrQrZMsgFlagcCs|��o|�d�S)NZMSG_rrrrrrVrZAddressInfocCs|��o|�d�S)NZAI_rrrrrr[rz	127.0.0.1z::1cCs(z
||�WStk
r"|YSXdS)z{Convert a numeric family value to an IntEnum member.

    If it's not a known member, return the numeric value itself.
    N)�
ValueError)�valueZ
enum_klassrrr�_intenum_converteras
r�winz)Specified event object handle is invalid.�zInsufficient memory available.�z#One or more parameters are invalid.�WzOverlapped operation aborted.i�z2Overlapped I/O event object not in signaled state.i�z)Overlapped operation will complete later.i�zThe 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 blocki3'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@seZdZdS)�_GiveupOnSendfileN)�__name__�
__module__�__qualname__rrrrr"�sr"cs,eZdZdZdddgZd9dd�Zd	d
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zd:dddd�dd�Ze
ed�rzd;dd�Zn
d<dd�Zd=dd�Zd d!�Zd>d"d#�Zd$d%�Zejfd&d'�Zd(d)�Z�fd*d+�Ze�fd,d-��Ze�fd.d/��Zejd0k�rd1d2�Zd3d4�Znd5d2�Zd6d4�Zd7e_d8e_�ZS)?�socketz:A subclass of _socket.socket adding the makefile() method.�__weakref__�_io_refs�_closed���NcCsP|dkr,|dkrt}|dkr t}|dkr,d}tj�|||||�d|_d|_dS)Nr*rF)�AF_INET�SOCK_STREAM�_socketr&�__init__r(r))�self�family�type�proto�filenorrrr.�szsocket.__init__cCs|S�Nr�r/rrr�	__enter__�szsocket.__enter__cGs|js|��dSr4)r)�close)r/�argsrrr�__exit__�szsocket.__exit__cCs�t|dd�}d|jj|jj|r"dnd|��|j|j|jf}|s�z |��}|r^|dt	|�7}Wnt
k
rtYnXz |��}|r�|dt	|�7}Wnt
k
r�YnX|d7}|S)	zVWrap __repr__() to reveal the real class name and socket
        address(es).
        r)Fz,<%s.%s%s fd=%i, family=%s, type=%s, proto=%iz	 [closed]�z
, laddr=%sz
, raddr=%s�>)�getattr�	__class__r$r%r3r0r1r2�getsockname�str�errorZgetpeername)r/�closed�sZladdrZraddrrrr�__repr__�s4
��zsocket.__repr__cCstd|jj�d���dS)Nzcannot pickle z object)�	TypeErrorr=r#r5rrr�__getstate__szsocket.__getstate__cCs6t|���}|j|j|j|j|d�}|�|���|S)z�dup() -> socket object

        Duplicate the socket. Return a new socket object connected to the same
        system resource. The new socket is non-inheritable.
        �r3)�dupr3r=r0r1r2�
settimeout�
gettimeout)r/�fd�sockrrrrGsz
socket.dupcCsF|��\}}t|j|j|j|d�}t�dkr>|��r>|�d�||fS)z�accept() -> (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).
        rFNT)Z_acceptr&r0r1r2ZgetdefaulttimeoutrI�setblocking)r/rJ�addrrKrrr�accepts

z
socket.accept�r)�encoding�errors�newlinec
Cs�t|�dddhks td|f��d|k}d|kp4|}d|k}d}	|rN|	d7}	|rZ|	d7}	t||	�}
|jd7_|dkr~d}|d	kr�tj}|d	kr�|s�td
��|
S|r�|r�t�|
|
|�}n|r�t�|
|�}nt�|
|�}|r�|St�	||||�}||_
|S)z�makefile(...) -> 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'.
        rO�w�bz&invalid mode %r (only r, w, b allowed)r:�Nr*rz!unbuffered streams must be binary)�setr�SocketIOr(�io�DEFAULT_BUFFER_SIZE�BufferedRWPair�BufferedReader�BufferedWriter�
TextIOWrapper�mode)
r/r^�	bufferingrPrQrRZwritingZreadingZbinaryZrawmode�raw�buffer�textrrr�makefile-s<
zsocket.makefile�sendfilerc
Cs�|�|||�|��}z|��}Wn0ttjfk
rR}zt|��W5d}~XYnXzt�|�j}Wn*t	k
r�}zt|��W5d}~XYnX|s�dSt
|p�|d�}|��}	|	dkr�td��t
td�r�t��}
nt��}
|
�|tj�d}|
j}tj}
z�|	�r||	��st�d��|�r0||}|dk�r0�q�z|
||||�}Wn`tk
�rh|	�s`|�Yq�Yq�t	k
�r�}z|dk�r�t|��|d�W5d}~XYq�X|dk�r��q�||7}||7}q�|W�S|dk�r�t
|d��r�|�|�XdS)Nri@�&non-blocking sockets are not supported�PollSelector�seekz	timed out)�_check_sendfile_paramsr3�AttributeErrorrX�UnsupportedOperationr"�os�fstat�st_size�OSError�minrIr�hasattr�	selectorsrfZSelectSelector�registerZEVENT_WRITEZselectrdrgr-�timeout�BlockingIOError)r/�file�offset�countZsocknor3�errZfsize�	blocksizersZselector�
total_sentZselector_selectZos_sendfile�sentrrr�_sendfile_use_sendfileYs^






zsocket._sendfile_use_sendfilecCstd��dS)Nz,os.sendfile() not available on this platform)r"�r/rurvrwrrrr|�s�c

Cs�|�|||�|��dkr"td��|r0|�|�|r>t|d�nd}d}|j}|j}z�|rpt|||�}|dkrpq�t||��}|s�q�z||�}	Wnt	k
r�Yq�Yq�X||	7}|	t
|�kr�||	d�}q�qTq�qT|W�S|dkr�t|d�r�|�||�XdS)Nrrei rg)rhrIrrgro�read�sendrp�
memoryviewrt�len)
r/rurvrwryrzZ	file_readZ	sock_send�datar{rrr�_sendfile_use_send�s8

zsocket._sendfile_use_sendcCsddt|dd�krtd��|jt@s*td��|dk	r`t|t�sJtd�|���|dkr`td�|���dS)NrTr^z$file should be opened in binary modez+only SOCK_STREAM type sockets are supportedz+count must be a positive integer (got {!r})r)r<rr1r,�
isinstance�intrD�formatr}rrrrh�s

��zsocket._check_sendfile_paramscCs8z|�|||�WStk
r2|�|||�YSXdS)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.
        N)r|r"r�r}rrrrd�szsocket.sendfilecCs*|jdkr|jd8_|jr&|��dS)NrrU)r(r)r7r5rrr�_decref_socketios�s
zsocket._decref_socketioscCs|�|�dSr4)r7)r/Z_ssrrr�_real_close�szsocket._real_closecCsd|_|jdkr|��dS)NTr)r)r(r�r5rrrr7�s
zsocket.closecsd|_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)r)�super�detachr5�r=rrr��sz
socket.detachcstt�jt�S)z@Read-only access to the address family for this socket.
        )rr�r0rr5r�rrr0sz
socket.familycstt�jt�S)z-Read-only access to the socket type.
        )rr�r1rr5r�rrr1szsocket.type�ntcCst�|���Sr4)rkZget_handle_inheritabler3r5rrr�get_inheritable
szsocket.get_inheritablecCst�|��|�dSr4)rkZset_handle_inheritabler3�r/Zinheritablerrr�set_inheritableszsocket.set_inheritablecCst�|���Sr4)rkr�r3r5rrrr�scCst�|��|�dSr4)rkr�r3r�rrrr�sz&Get the inheritable flag of the socketz&Set the inheritable flag of the socket)r*r*r*N)rON)rN)rN)rN)rN) r#r$r%�__doc__�	__slots__r.r6r9rCrErGrNrcrprkr|r�rhrdr�r-r&r�r7r��propertyr0r1�namer�r��
__classcell__rrr�rr&�sF

�*
A

$


r&cCst|�}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().
    )rGr&)rJr0r1r2Znfdrrrr
sZsharecCstddd|�S)z� fromshare(info) -> socket object

        Create a socket object from the bytes object returned by
        socket.share(pid).
        r)r&)�inforrr�	fromshare#sr��
socketpaircCsh|dkr*zt}Wntk
r(t}YnXt�|||�\}}t||||���}t||||���}||fS)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.
        N)ZAF_UNIX�	NameErrorr+r-r�r&r�)r0r1r2�arTrrrr�.s
c
	Cs|tkrt}n|tkrt}ntd��|tkr4td��|dkrDtd��t|||�}z�|�|df�|�	�|�
�dd�\}}t|||�}zP|�d�z|�||f�Wnt
tfk
r�YnX|�d�|��\}}	Wn|���YnXW5|��X||fS)Nz?Only AF_INET and AF_INET6 socket address families are supportedz)Only SOCK_STREAM socket type is supportedrzOnly protocol zero is supported�FT)r+�
_LOCALHOST�AF_INET6�
_LOCALHOST_V6rr,r&r7�bind�listenr>rL�connectrt�InterruptedErrorrN)
r0r1r2�hostZlsockrM�portZcsockZssock�_rrrr�Cs8


a8socketpair([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.
cspeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Z�fdd
�Z	dd�Z
edd��Zedd��Z
dd�Z�ZS)rWz�Raw 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.
    cCsZ|dkrtd|��tj�|�||_d|kr6|d7}||_d|k|_d|k|_d|_dS)N)rOrSZrw�rb�wbZrwbzinvalid mode: %rrTrOrSF)	rrX�	RawIOBaser.�_sock�_mode�_reading�_writing�_timeout_occurred)r/rKr^rrrr.�s

zSocketIO.__init__c
Cs�|��|��|jrtd��z|j�|�WStk
rHd|_�Yqtk
r�}z|jdt	krpWY�
dS�W5d}~XYqXqdS)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 objectTrN)
�_checkClosed�_checkReadabler�rnr�Z	recv_intorsr@r8�_blocking_errnos�r/rT�errr�readinto�s
zSocketIO.readintoc
Cs`|��|��z|j�|�WStk
rZ}z|jdtkrHWY�
dS�W5d}~XYnXdS)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.
        rN)r��_checkWritabler�rr@r8r�r�rrr�write�s
zSocketIO.writecCs|jrtd��|jS)z2True if the SocketIO is open for reading.
        �I/O operation on closed socket.)rArr�r5rrr�readable�szSocketIO.readablecCs|jrtd��|jS)z2True if the SocketIO is open for writing.
        r�)rArr�r5rrr�writable�szSocketIO.writablecs|jrtd��t���S)z2True if the SocketIO is open for seeking.
        r�)rArr��seekabler5r�rrr��szSocketIO.seekablecCs|��|j��S)z=Return the file descriptor of the underlying socket.
        )r�r�r3r5rrrr3�szSocketIO.filenocCs|js|��SdSdS)Nr*)rAr3r5rrrr��sz
SocketIO.namecCs|jSr4)r�r5rrrr^�sz
SocketIO.modecCs*|jr
dStj�|�|j��d|_dS)z�Close the SocketIO object.  This doesn't close the underlying
        socket, except if all references to it have disappeared.
        N)rArXr�r7r�r�r5rrrr7�s

zSocketIO.close)r#r$r%r�r.r�r�r�r�r�r3r�r�r^r7r�rrr�rrWrs

rWr:cCsl|��}|r|dkrt�}zt|�\}}}Wntk
r@Yn(X|�d|�|D]}d|krRqhqR|}|S)aGet 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
    from gethostname() is returned.
    z0.0.0.0r�.)�stripZgethostnameZ
gethostbyaddrr@�insert)r�Zhostname�aliasesZipaddrsrrrr�s	cCs�|\}}d}t||dt�D]�}|\}}}	}
}d}zDt|||	�}|tk	rP|�|�|r^|�|�|�|�d}|WStk
r�}
z|
}|dk	r�|��W5d}
~
XYqXq|dk	r�z|�W5d}Xntd��dS)acConnect 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.
    Nrz!getaddrinfo returns an empty list)	�getaddrinfor,r&�_GLOBAL_DEFAULT_TIMEOUTrHr�r�r@r7)�addressrsZsource_addressr�r�rx�res�af�socktyper2�	canonname�sarKr�rrrrs.



c	Csltrttd�rttd�sdSz4ttt�� }|�ttd�W5QR�WdSQRXWnt	k
rfYdSXdS)z�Return True if the platform supports creating a SOCK_STREAM socket
    which can handle both AF_INET and AF_INET6 (IPv4 / IPv6) connections.
    �IPPROTO_IPV6�IPV6_V6ONLYFrTN)
�has_ipv6rpr-r&r�r,�
setsockoptr�r�r@)rKrrrr0s��F)r0�backlog�
reuse_port�dualstack_ipv6c
Csn|rttd�std��|r8t�s(td��|tkr8td��t|t�}�ztjdkr�ttd�r�z|�	t
td�Wntk
r�YnX|r�|�	t
t
d�tr�|tkr�|r�|�	ttd�n"ttd	�r�ttd
�r�|�	ttd�z|�|�Wn@tk
�r$}z d|j|f}t|j|�d�W5d}~XYnX|dk�r:|��n
|�|�|WStk
�rh|���YnXdS)
a�Convenience 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)r��cygwin�SO_REUSEADDRrUrr�r�z+%s (while attempting to bind on address %r)N)rpr-rrr�r&r,rkr�r�Z
SOL_SOCKETr�r@r�r�r�r�r��strerror�errnor�r7)r�r0r�r�r�rKrx�msgrrrr
@sN


�
�� 


cCsPg}t�||||||�D]2}|\}}	}}
}|�t|t�t|	t�||
|f�q|S)a�Resolve 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-r��appendrrr)r�r�r0r1r2�flagsZaddrlistr�r�r�r�r�rrrr��s�r�)r)r:)rrrr)0r�r-rk�sysrXrq�enumrrr��ImportErrorr<rrr	�__all__�extend�_get_exports_list�	_convert_r#r�r�rr&Z_realsocket�platform�lowerrr!r��	Exceptionr"r
rpr�r,r�r+r�r�rWr�objectr�rrr
r�rrrr�<module>sH- 
�����

F
	
$
u
�
-�E

?>