/snap/core18/2979/usr/lib/python3.6/__pycache__
NameSizeModeActions
abc.cpython-36.pyc75150644editdlrm
aifc.cpython-36.pyc259430644editdlrm
antigravity.cpython-36.pyc7790644editdlrm
argparse.cpython-36.pyc604560644editdlrm
ast.cpython-36.pyc117040644editdlrm
asynchat.cpython-36.pyc68150644editdlrm
asyncore.cpython-36.pyc158380644editdlrm
base64.cpython-36.pyc170590644editdlrm
bdb.cpython-36.pyc170330644editdlrm
binhex.cpython-36.pyc120860644editdlrm
bisect.cpython-36.pyc26760644editdlrm
bz2.cpython-36.pyc112820644editdlrm
calendar.cpython-36.pyc258820644editdlrm
cgi.cpython-36.pyc284160644editdlrm
cgitb.cpython-36.pyc100800644editdlrm
chunk.cpython-36.pyc49000644editdlrm
cmd.cpython-36.pyc125750644editdlrm
code.cpython-36.pyc98360644editdlrm
codecs.cpython-36.pyc339000644editdlrm
codeop.cpython-36.pyc62700644editdlrm
colorsys.cpython-36.pyc33110644editdlrm
compileall.cpython-36.pyc82780644editdlrm
configparser.cpython-36.pyc452440644editdlrm
contextlib.cpython-36.pyc111580644editdlrm
copy.cpython-36.pyc70790644editdlrm
copyreg.cpython-36.pyc42440644editdlrm
cProfile.cpython-36.pyc42940644editdlrm
crypt.cpython-36.pyc22420644editdlrm
csv.cpython-36.pyc118550644editdlrm
datetime.cpython-36.pyc545110644editdlrm
decimal.cpython-36.pyc3510644editdlrm
difflib.cpython-36.pyc596420644editdlrm
dis.cpython-36.pyc141810644editdlrm
doctest.cpython-36.pyc755890644editdlrm
dummy_threading.cpython-36.pyc11020644editdlrm
enum.cpython-36.pyc234530644editdlrm
filecmp.cpython-36.pyc83050644editdlrm
fileinput.cpython-36.pyc131520644editdlrm
fnmatch.cpython-36.pyc28740644editdlrm
formatter.cpython-36.pyc175790644editdlrm
fractions.cpython-36.pyc184260644editdlrm
ftplib.cpython-36.pyc283570644editdlrm
functools.cpython-36.pyc240620644editdlrm
genericpath.cpython-36.pyc37260644editdlrm
getopt.cpython-36.pyc62170644editdlrm
getpass.cpython-36.pyc41770644editdlrm
gettext.cpython-36.pyc143060644editdlrm
glob.cpython-36.pyc42590644editdlrm
gzip.cpython-36.pyc162260644editdlrm
hashlib.cpython-36.pyc66920644editdlrm
heapq.cpython-36.pyc142920644editdlrm
hmac.cpython-36.pyc48360644editdlrm
imaplib.cpython-36.pyc421380644editdlrm
imghdr.cpython-36.pyc41500644editdlrm
imp.cpython-36.pyc96960644editdlrm
inspect.cpython-36.pyc797390644editdlrm
io.cpython-36.pyc33870644editdlrm
ipaddress.cpython-36.pyc623860644editdlrm
keyword.cpython-36.pyc17650644editdlrm
linecache.cpython-36.pyc37780644editdlrm
locale.cpython-36.pyc340300644editdlrm
lzma.cpython-36.pyc119920644editdlrm
macpath.cpython-36.pyc56410644editdlrm
macurl2path.cpython-36.pyc18670644editdlrm
mailbox.cpython-36.pyc637520644editdlrm
mailcap.cpython-36.pyc72090644editdlrm
mimetypes.cpython-36.pyc155530644editdlrm
modulefinder.cpython-36.pyc153660644editdlrm
netrc.cpython-36.pyc38360644editdlrm
nntplib.cpython-36.pyc337800644editdlrm
ntpath.cpython-36.pyc131900644editdlrm
nturl2path.cpython-36.pyc14990644editdlrm
numbers.cpython-36.pyc121420644editdlrm
opcode.cpython-36.pyc54130644editdlrm
operator.cpython-36.pyc139130644editdlrm
optparse.cpython-36.pyc480540644editdlrm
os.cpython-36.pyc296280644editdlrm
pathlib.cpython-36.pyc420070644editdlrm
pdb.cpython-36.pyc460940644editdlrm
pickle.cpython-36.pyc426910644editdlrm
pickletools.cpython-36.pyc660200644editdlrm
pipes.cpython-36.pyc78080644editdlrm
pkgutil.cpython-36.pyc162610644editdlrm
platform.cpython-36.pyc291970644editdlrm
plistlib.cpython-36.pyc280550644editdlrm
poplib.cpython-36.pyc133290644editdlrm
posixpath.cpython-36.pyc104560644editdlrm
pprint.cpython-36.pyc158240644editdlrm
profile.cpython-36.pyc139010644editdlrm
pstats.cpython-36.pyc218570644editdlrm
pty.cpython-36.pyc38610644editdlrm
pyclbr.cpython-36.pyc83650644editdlrm
pydoc.cpython-36.pyc837750644editdlrm
py_compile.cpython-36.pyc65440644editdlrm
queue.cpython-36.pyc87550644editdlrm
quopri.cpython-36.pyc57730644editdlrm
random.cpython-36.pyc193300644editdlrm
re.cpython-36.pyc140580644editdlrm
reprlib.cpython-36.pyc54000644editdlrm
rlcompleter.cpython-36.pyc57800644editdlrm
runpy.cpython-36.pyc79820644editdlrm
sched.cpython-36.pyc65640644editdlrm
secrets.cpython-36.pyc21620644editdlrm
selectors.cpython-36.pyc176970644editdlrm
shelve.cpython-36.pyc94580644editdlrm
shlex.cpython-36.pyc69700644editdlrm
shutil.cpython-36.pyc307040644editdlrm
signal.cpython-36.pyc25150644editdlrm
site.cpython-36.pyc165600644editdlrm
sitecustomize.cpython-36.pyc2120644editdlrm
smtpd.cpython-36.pyc266830644editdlrm
smtplib.cpython-36.pyc353400644editdlrm
sndhdr.cpython-36.pyc69130644editdlrm
socket.cpython-36.pyc220130644editdlrm
socketserver.cpython-36.pyc242500644editdlrm
sre_compile.cpython-36.pyc102780644editdlrm
sre_constants.cpython-36.pyc59720644editdlrm
sre_parse.cpython-36.pyc203580644editdlrm
ssl.cpython-36.pyc369390644editdlrm
stat.cpython-36.pyc38510644editdlrm
statistics.cpython-36.pyc181740644editdlrm
string.cpython-36.pyc79640644editdlrm
stringprep.cpython-36.pyc100300644editdlrm
struct.cpython-36.pyc3120644editdlrm
subprocess.cpython-36.pyc354850644editdlrm
sunau.cpython-36.pyc169380644editdlrm
symbol.cpython-36.pyc25170644editdlrm
symtable.cpython-36.pyc104280644editdlrm
sysconfig.cpython-36.pyc159160644editdlrm
tabnanny.cpython-36.pyc69750644editdlrm
tarfile.cpython-36.pyc630850644editdlrm
telnetlib.cpython-36.pyc180970644editdlrm
tempfile.cpython-36.pyc253090644editdlrm
textwrap.cpython-36.pyc136840644editdlrm
this.cpython-36.pyc12650644editdlrm
threading.cpython-36.pyc372340644editdlrm
timeit.cpython-36.pyc116030644editdlrm
token.cpython-36.pyc33200644editdlrm
tokenize.cpython-36.pyc186470644editdlrm
trace.cpython-36.pyc194950644editdlrm
traceback.cpython-36.pyc196460644editdlrm
tracemalloc.cpython-36.pyc172290644editdlrm
tty.cpython-36.pyc10720644editdlrm
turtle.cpython-36.pyc1317510644editdlrm
types.cpython-36.pyc82010644editdlrm
typing.cpython-36.pyc733060644editdlrm
uu.cpython-36.pyc34980644editdlrm
uuid.cpython-36.pyc209180644editdlrm
warnings.cpython-36.pyc132580644editdlrm
wave.cpython-36.pyc178850644editdlrm
weakref.cpython-36.pyc191430644editdlrm
webbrowser.cpython-36.pyc157970644editdlrm
xdrlib.cpython-36.pyc83020644editdlrm
zipapp.cpython-36.pyc55340644editdlrm
zipfile.cpython-36.pyc497280644editdlrm
_bootlocale.cpython-36.pyc9800644editdlrm
_collections_abc.cpython-36.pyc287970644editdlrm
_compat_pickle.cpython-36.pyc65660644editdlrm
_compression.cpython-36.pyc41040644editdlrm
_dummy_thread.cpython-36.pyc48510644editdlrm
_markupbase.cpython-36.pyc79910644editdlrm
_osx_support.cpython-36.pyc96840644editdlrm
_pydecimal.cpython-36.pyc1634020644editdlrm
_pyio.cpython-36.pyc713860644editdlrm
_sitebuiltins.cpython-36.pyc34350644editdlrm
_strptime.cpython-36.pyc159630644editdlrm
_sysconfigdata_m_linux_x86_64-linux-gnu.cpython-36.pyc187790644editdlrm
_threading_local.cpython-36.pyc64250644editdlrm
_weakrefset.cpython-36.pyc78280644editdlrm
__future__.cpython-36.pyc41670644editdlrm
__phello__.foo.cpython-36.pyc1190644editdlrm
Edit: /snap/core18/2979/usr/lib/python3.6/__pycache__/socket.cpython-36.pyc (22013B)
3 Nqi3k @spdZddlZddlTddlZddlZddlZddlZddlmZmZy ddl Z Wne k rhdZ YnXe e ddZ e e ddZ e e d dZd d d d dgZejejeejd eddejdeddejdeddejdedddZdZddZeZejjjdriZded<ded<ded <d!ed"<d#ed$<d%ed&<d'ed(<d)ed*<d+ed,<d-ed.<d/ed0<d1ed2<d3ed4<d5ed6<d7ed8<ejd9Gd:d;d;eZGdd Z e!ejd?rd@dAZ"ejdAe!edBr de#dfdCdBZ$ne%e#dfdDdBZ$ejdBdEe$_e ehZ&GdFdGdGej'Z(dNdId Z)e*Z+e+dfdJd Z,dOdKdLZ-dS)Pa0This 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)*)IntEnumIntFlagEBADF EAGAIN EWOULDBLOCKfromfdgetfqdncreate_connection AddressFamily SocketKindcCs|jo|jdS)NZAF_)isupper startswith)Cr/usr/lib/python3.6/socket.pyLsrcCs|jo|jdS)NZSOCK_)rr)rrrrrQsZMsgFlagcCs|jo|jdS)NZMSG_)rr)rrrrrVsZ AddressInfocCs|jo|jdS)NZAI_)rr)rrrrr[sz 127.0.0.1z::1c Cs"y||Stk r|SXdS)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_converterasrwinzThe 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&'z The socket operation would blocki3'z,A blocking operation is already in progress.i4'zThe network address is in use.i@'zThe connection has been reset.iF'zThe network has been shut down.iJ'zThe operation timed out.iL'zConnection refused.iM'zThe name is too long.iO'zThe host is down.iP'zThe host is unreachable.iQ'errorTabc@s eZdZdS)_GiveupOnSendfileN)__name__ __module__ __qualname__rrrrrsrcs4eZdZdZdddgZeeddfddZd d Zd d Z d dZ ddZ ddZ ddZ d8ddddddZeedrd9ddZn d:ddZd;ddZdd Zd) getattr __class__rrr(r%r&r' getsocknamestrerrorZ getpeername)r$closedsZladdrZraddrrrr__repr__s0   zsocket.__repr__cCs tddS)NzCannot serialize socket object) TypeError)r$rrr __getstate__szsocket.__getstate__cCs6t|j}|j|j|j|j|d}|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. )r()dupr(r0r%r&r' settimeout gettimeout)r$fdsockrrrr9s z socket.dupcCsZ|j\}}|jtjdd@}t|j||j|d}tdkrR|jrR|j d||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). Z SOCK_NONBLOCKr)r(NT) Z_acceptr&globalsgetrr%r'Zgetdefaulttimeoutr; setblocking)r$r<addrr&r=rrraccepts   z socket.acceptr)encodingerrorsnewlinec Cst|dddhks td|fd|k}d|kp4| }|sB|sBtd|k}d} |rZ| d7} |rf| d7} t|| } |jd7_|dkrd }|dkrtj}|dkr|std | S|r|rtj| | |} n&|rtj| |} n|sttj | |} |r| Stj | |||} || _ | 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'. rCwbz&invalid mode %r (only r, w, b allowed)r-Nrz!unbuffered streams must be binary) setrAssertionErrorSocketIOr ioDEFAULT_BUFFER_SIZEBufferedRWPairBufferedReaderBufferedWriter TextIOWrappermode) r$rT bufferingrDrErFZwritingZreadingZbinaryZrawmoderawbuffertextrrrmakefiles@   zsocket.makefilesendfilec2Cs|j||||j}y |j}Wn0ttjfk rR}zt|WYdd}~XnXytj|j}Wn*t k r}zt|WYdd}~XnX|sdS|s|n|}|j } | dkrt dt t drt j} nt j} | j|t jd} | j} tj} zx| r| |  rtjd|r0|| }|dkr0Py| ||||}Wn^tk rf| s`| wYqt k r}z| dkrt||dWYdd}~XqX|dkrP||7}| |7} qW| S| dkrt |dr|j|XdS)Nrz&non-blocking sockets are not supported PollSelectorz timed outseek)_check_sendfile_paramsr(AttributeErrorrNUnsupportedOperationrosfstatst_sizeOSErrorr;rhasattr selectorsr[ZSelectSelectorregisterZ EVENT_WRITEZselectrZr"timeoutBlockingIOErrorr\)r$fileoffsetcountZsocknor(errZfsize blocksizergZselector total_sentZselector_selectZ os_sendfilesentrrr_sendfile_use_sendfiles`         zsocket._sendfile_use_sendfilecCs tddS)Nz,os.sendfile() not available on this platform)r)r$rirjrkrrrrpGsc Cs|j||||jdkr"td|r0|j||r>t|dnd}d}|j}|j}zx|rrt|||}|dkrrPt||}|sPxLy ||} Wntk rwYqX|| 7}| t |kr|| d}qPqWqVW|S|dkot |dr|j||XdS)Nrz&non-blocking sockets are not supportedi r\) r]r;rr\minreadsend memoryviewrhlenrd) r$rirjrkrmrnZ file_readZ sock_senddatarorrr_sendfile_use_sendKs<      zsocket._sendfile_use_sendcCsddt|ddkrtd|jt@s*td|dk r`t|tsJtdj||dkr`tdj|dS)NrHrTz$file should be opened in binary modez+only SOCK_STREAM type sockets are supportedz+count must be a positive integer (got {!r})r)r/rr& SOCK_STREAM isinstanceintr7format)r$rirjrkrrrr]os   zsocket._check_sendfile_paramsc Cs2y|j|||Stk r,|j|||SXdS)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)rprrw)r$rirjrkrrrrZ|szsocket.sendfilecCs*|jdkr|jd8_|jr&|jdS)NrrI)r r!r*)r$rrr_decref_socketioss zsocket._decref_socketioscCs|j|dS)N)r*)r$Z_ssrrr _real_closeszsocket._real_closecCsd|_|jdkr|jdS)NTr)r!r r})r$rrrr*s z socket.closecsd|_tjS)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!superdetach)r$)r0rrrsz socket.detachcsttjtS)z@Read-only access to the address family for this socket. )rr~r%r )r$)r0rrr%sz socket.familycsttjtS)z-Read-only access to the socket type. )rr~r&r)r$)r0rrr&sz socket.typentcCstj|jS)N)r`Zget_handle_inheritabler()r$rrrget_inheritableszsocket.get_inheritablecCstj|j|dS)N)r`Zset_handle_inheritabler()r$ inheritablerrrset_inheritableszsocket.set_inheritablecCstj|jS)N)r`rr()r$rrrrscCstj|j|dS)N)r`rr()r$rrrrrsz&Get the inheritable flag of the socketz&Set the inheritable flag of the socket)rCN)rN)rN)rN)rN)"rrr__doc__ __slots__AF_INETrxr#r)r,r6r8r9rBrYrdr`rprwr]rZr|r"rr}r*rpropertyr%r&namerr __classcell__rr)r0rrs<   )  A  $    rcCst|}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(). )r9r)r<r%r&r'Znfdrrrr sZsharecCstddd|S)z fromshare(info) -> socket object Create a socket object from the bytes object returned by socket.share(pid). r)r)inforrr fromsharesr socketpairc Csh|dkr*yt}Wntk r(t}YnXtj|||\}}t||||j}t||||j}||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 NameErrorrr"rrr)r%r&r'arHrrrrs c Cs|tkrt}n|tkrt}ntd|tkr4td|dkrDtdt|||}z|j|df|j|j dd\}}t|||}yP|j dy|j ||fWnt t fk rYnX|j d|j\}} Wn|jYnXWd|jX||fS)Nz?Only AF_INET and AF_INET6 socket address families are supportedz)Only SOCK_STREAM socket type is supportedrzOnly protocol zero is supportedFT)r _LOCALHOSTZAF_INET6 _LOCALHOST_V6rrxrbindZlistenr1r@connectrhInterruptedErrorrBr*) r%r&r'hostZlsockrAportZcsockZssock_rrrrs8      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. cspeZdZdZddZddZddZdd Zd d Zfd d Z ddZ e ddZ e ddZ ddZZS)rMzRaw 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|d krtd|tjj|||_d|kr6|d7}||_d|k|_d|k|_d |_dS) NrCrGrwrbwbrwbzinvalid mode: %rrHF)rCrGrrrr) rrN RawIOBaser#_sock_mode_reading_writing_timeout_occurred)r$r=rTrrrr#0s    zSocketIO.__init__cCs|j|j|jrtdxby |jj|Stk rHd|_Yq tk r|}z|jdt krjdSWYdd}~Xq Xq WdS)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_checkReadablerrcrZ recv_intorgr3r+_blocking_errnos)r$rHerrrreadinto<s zSocketIO.readintocCsX|j|jy |jj|Stk rR}z|jdtkr@dSWYdd}~XnXdS)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_checkWritablerrsr3r+r)r$rHrrrrwriteSs zSocketIO.writecCs|jrtd|jS)z2True if the SocketIO is open for reading. zI/O operation on closed socket.)r4rr)r$rrrreadablecszSocketIO.readablecCs|jrtd|jS)z2True if the SocketIO is open for writing. zI/O operation on closed socket.)r4rr)r$rrrwritablejszSocketIO.writablecs|jrtdtjS)z2True if the SocketIO is open for seeking. zI/O operation on closed socket.)r4rr~seekable)r$)r0rrrqszSocketIO.seekablecCs|j|jjS)z=Return the file descriptor of the underlying socket. )rrr()r$rrrr(xszSocketIO.filenocCs|js|jSdSdS)NrIrJ)r4r()r$rrrr~sz SocketIO.namecCs|jS)N)r)r$rrrrTsz SocketIO.modecCs*|jr dStjj||jjd|_dS)zClose the SocketIO object. This doesn't close the underlying socket, except if all references to it have disappeared. N)r4rNrr*rr|)r$rrrr*s   zSocketIO.close)rrrrr#rrrrrr(rrrTr*rrr)r0rrMs     rMr-c Csp|j}| s|dkrt}yt|\}}}Wntk rBYn*X|jd|x|D]}d|krVPqVW|}|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.)stripZ gethostnameZ gethostbyaddrr3insert)rZhostnamealiasesZipaddrsrrrr s   cCs|\}}d}xt||dtD]}|\}}} } } d} y>t||| } |tk rR| j||r`| j|| j| d}| Stk r} z| }| dk r| jWYdd} ~ XqXqW|dk r|ntddS)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) getaddrinforxr_GLOBAL_DEFAULT_TIMEOUTr:rrr3r*)ZaddressrgZsource_addressrrrlresafsocktyper' canonnamesar=rrrrr s*    c CsTg}xJtj||||||D]2}|\}} }} } |jt|tt| t|| | fqW|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"rappendrr r) rrr%r&r'flagsZaddrlistrrrrrrrrrs r)r)r-)rrrr).rr"r`sysrNreenumrrerrno ImportErrorr/rrr __all__extend_get_exports_list_convertrrrrrZ _realsocketplatformlowerrrr Exceptionrr rdrrxrrrrrMr objectrr rrrrr/s            C   $ u  '