/snap/core20/2866/usr/lib/python3.8/__pycache__
NameSizeModeActions
abc.cpython-38.pyc53340644editdlrm
aifc.cpython-38.pyc254740644editdlrm
antigravity.cpython-38.pyc7970644editdlrm
argparse.cpython-38.pyc625910644editdlrm
ast.cpython-38.pyc167630644editdlrm
asynchat.cpython-38.pyc68510644editdlrm
asyncore.cpython-38.pyc160280644editdlrm
base64.cpython-38.pyc170710644editdlrm
bdb.cpython-38.pyc249210644editdlrm
binhex.cpython-38.pyc121340644editdlrm
bisect.cpython-38.pyc23540644editdlrm
bz2.cpython-38.pyc114450644editdlrm
calendar.cpython-38.pyc270640644editdlrm
cgi.cpython-38.pyc265440644editdlrm
cgitb.cpython-38.pyc101500644editdlrm
chunk.cpython-38.pyc48390644editdlrm
cmd.cpython-38.pyc126260644editdlrm
code.cpython-38.pyc99130644editdlrm
codecs.cpython-38.pyc339560644editdlrm
codeop.cpython-38.pyc64170644editdlrm
colorsys.cpython-38.pyc32400644editdlrm
compileall.cpython-38.pyc94100644editdlrm
configparser.cpython-38.pyc457180644editdlrm
contextlib.cpython-38.pyc202290644editdlrm
contextvars.cpython-38.pyc2430644editdlrm
copy.cpython-38.pyc69870644editdlrm
copyreg.cpython-38.pyc43180644editdlrm
cProfile.cpython-38.pyc54800644editdlrm
crypt.cpython-38.pyc33870644editdlrm
csv.cpython-38.pyc119100644editdlrm
dataclasses.cpython-38.pyc236530644editdlrm
datetime.cpython-38.pyc571730644editdlrm
decimal.cpython-38.pyc3590644editdlrm
difflib.cpython-38.pyc594380644editdlrm
dis.cpython-38.pyc158080644editdlrm
doctest.cpython-38.pyc759740644editdlrm
dummy_threading.cpython-38.pyc11100644editdlrm
enum.cpython-38.pyc259620644editdlrm
filecmp.cpython-38.pyc84270644editdlrm
fileinput.cpython-38.pyc133730644editdlrm
fnmatch.cpython-38.pyc33550644editdlrm
formatter.cpython-38.pyc175450644editdlrm
fractions.cpython-38.pyc187390644editdlrm
ftplib.cpython-38.pyc280070644editdlrm
functools.cpython-38.pyc279010644editdlrm
genericpath.cpython-38.pyc40010644editdlrm
getopt.cpython-38.pyc62710644editdlrm
getpass.cpython-38.pyc41780644editdlrm
gettext.cpython-38.pyc180000644editdlrm
glob.cpython-38.pyc43430644editdlrm
gzip.cpython-38.pyc181840644editdlrm
hashlib.cpython-38.pyc67270644editdlrm
heapq.cpython-38.pyc140700644editdlrm
hmac.cpython-38.pyc63880644editdlrm
imaplib.cpython-38.pyc413420644editdlrm
imghdr.cpython-38.pyc41180644editdlrm
imp.cpython-38.pyc98090644editdlrm
inspect.cpython-38.pyc805930644editdlrm
io.cpython-38.pyc34540644editdlrm
ipaddress.cpython-38.pyc628290644editdlrm
keyword.cpython-38.pyc9980644editdlrm
linecache.cpython-38.pyc38670644editdlrm
locale.cpython-38.pyc346740644editdlrm
lzma.cpython-38.pyc120180644editdlrm
mailbox.cpython-38.pyc602640644editdlrm
mailcap.cpython-38.pyc72060644editdlrm
mimetypes.cpython-38.pyc160310644editdlrm
modulefinder.cpython-38.pyc161150644editdlrm
netrc.cpython-38.pyc37770644editdlrm
nntplib.cpython-38.pyc339740644editdlrm
ntpath.cpython-38.pyc140910644editdlrm
nturl2path.cpython-38.pyc17440644editdlrm
numbers.cpython-38.pyc122020644editdlrm
opcode.cpython-38.pyc54200644editdlrm
operator.cpython-38.pyc136910644editdlrm
optparse.cpython-38.pyc480570644editdlrm
os.cpython-38.pyc313970644editdlrm
pathlib.cpython-38.pyc442090644editdlrm
pdb.cpython-38.pyc472260644editdlrm
pickle.cpython-38.pyc469080644editdlrm
pickletools.cpython-38.pyc672040644editdlrm
pipes.cpython-38.pyc77950644editdlrm
pkgutil.cpython-38.pyc163090644editdlrm
platform.cpython-38.pyc243260644editdlrm
plistlib.cpython-38.pyc273740644editdlrm
poplib.cpython-38.pyc134590644editdlrm
posixpath.cpython-38.pyc104610644editdlrm
pprint.cpython-38.pyc162810644editdlrm
profile.cpython-38.pyc147580644editdlrm
pstats.cpython-38.pyc220660644editdlrm
pty.cpython-38.pyc39550644editdlrm
pyclbr.cpython-38.pyc104510644editdlrm
pydoc.cpython-38.pyc836460644editdlrm
py_compile.cpython-38.pyc73520644editdlrm
queue.cpython-38.pyc106260644editdlrm
quopri.cpython-38.pyc57480644editdlrm
random.cpython-38.pyc201080644editdlrm
re.cpython-38.pyc144220644editdlrm
reprlib.cpython-38.pyc53030644editdlrm
rlcompleter.cpython-38.pyc57550644editdlrm
runpy.cpython-38.pyc81810644editdlrm
sched.cpython-38.pyc65320644editdlrm
secrets.cpython-38.pyc21900644editdlrm
selectors.cpython-38.pyc169350644editdlrm
shelve.cpython-38.pyc94900644editdlrm
shlex.cpython-38.pyc75360644editdlrm
shutil.cpython-38.pyc372190644editdlrm
signal.cpython-38.pyc28430644editdlrm
site.cpython-38.pyc171680644editdlrm
sitecustomize.cpython-38.pyc2200644editdlrm
smtpd.cpython-38.pyc264630644editdlrm
smtplib.cpython-38.pyc355320644editdlrm
sndhdr.cpython-38.pyc69890644editdlrm
socket.cpython-38.pyc277870644editdlrm
socketserver.cpython-38.pyc253610644editdlrm
sre_compile.cpython-38.pyc151420644editdlrm
sre_constants.cpython-38.pyc63590644editdlrm
sre_parse.cpython-38.pyc216470644editdlrm
ssl.cpython-38.pyc450370644editdlrm
stat.cpython-38.pyc43720644editdlrm
statistics.cpython-38.pyc336530644editdlrm
string.cpython-38.pyc73000644editdlrm
stringprep.cpython-38.pyc110170644editdlrm
struct.cpython-38.pyc3300644editdlrm
subprocess.cpython-38.pyc419670644editdlrm
sunau.cpython-38.pyc170800644editdlrm
symbol.cpython-38.pyc24040644editdlrm
symtable.cpython-38.pyc113220644editdlrm
sysconfig.cpython-38.pyc158370644editdlrm
tabnanny.cpython-38.pyc70300644editdlrm
tarfile.cpython-38.pyc630430644editdlrm
telnetlib.cpython-38.pyc182370644editdlrm
tempfile.cpython-38.pyc266530644editdlrm
textwrap.cpython-38.pyc135190644editdlrm
this.cpython-38.pyc12610644editdlrm
threading.cpython-38.pyc399760644editdlrm
timeit.cpython-38.pyc117770644editdlrm
token.cpython-38.pyc24850644editdlrm
tokenize.cpython-38.pyc171600644editdlrm
trace.cpython-38.pyc200260644editdlrm
traceback.cpython-38.pyc199380644editdlrm
tracemalloc.cpython-38.pyc173630644editdlrm
tty.cpython-38.pyc10760644editdlrm
turtle.cpython-38.pyc1300220644editdlrm
types.cpython-38.pyc91770644editdlrm
typing.cpython-38.pyc624200644editdlrm
uu.cpython-38.pyc36050644editdlrm
uuid.cpython-38.pyc236830644editdlrm
warnings.cpython-38.pyc136520644editdlrm
wave.cpython-38.pyc181490644editdlrm
weakref.cpython-38.pyc195180644editdlrm
webbrowser.cpython-38.pyc171200644editdlrm
xdrlib.cpython-38.pyc82210644editdlrm
zipapp.cpython-38.pyc58540644editdlrm
zipfile.cpython-38.pyc593360644editdlrm
zipimport.cpython-38.pyc172750644editdlrm
_bootlocale.cpython-38.pyc12430644editdlrm
_collections_abc.cpython-38.pyc287410644editdlrm
_compat_pickle.cpython-38.pyc55010644editdlrm
_compression.cpython-38.pyc41460644editdlrm
_dummy_thread.cpython-38.pyc60370644editdlrm
_markupbase.cpython-38.pyc77900644editdlrm
_osx_support.cpython-38.pyc115930644editdlrm
_pydecimal.cpython-38.pyc1607350644editdlrm
_pyio.cpython-38.pyc740790644editdlrm
_py_abc.cpython-38.pyc46700644editdlrm
_sitebuiltins.cpython-38.pyc34810644editdlrm
_strptime.cpython-38.pyc160440644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-38.pyc211210644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-38.pyc211150644editdlrm
_threading_local.cpython-38.pyc64460644editdlrm
_weakrefset.cpython-38.pyc76000644editdlrm
__future__.cpython-38.pyc41580644editdlrm
__phello__.foo.cpython-38.pyc1270644editdlrm
Edit: /snap/core20/2866/usr/lib/python3.8/__pycache__/socket.cpython-38.pyc (27787B)
U ¼Ê¦i«‰ã@sdZddlZddlTddlZddlZddlZddlZddlmZmZz ddl Z Wne k rhdZ YnXe e ddƒZ e e ddƒZ e e d dƒZd d d 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€<ded‚<dƒed„<d…ed†<d‡edˆ<d‰edŠ<d‹edŒ<dedŽ<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Ø<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/lib/python3.8/socket.pyÚLórcCs| ¡o| d¡S)NZSOCK_rrrrrrQrZMsgFlagcCs| ¡o| d¡S)NZMSG_rrrrrrVrZ AddressInfocCs| ¡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 „Zd d „Zd d„Zdd„Z dd„Z dd„Z d:ddddœdd„Z e edƒrzd;dd„Zn dd"d#„Zd$d%„Zejfd&d'„Zd(d)„Z‡fd*d+„Ze‡fd,d-„ƒZe‡fd.d/„ƒZejd0krd1d2„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ÚerrorZ getpeername)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 Cst|ƒdddhks td|fƒ‚d|k}d|kp4| }|sB|sBt‚d|k}d} |rZ| d7} |rf| d7} t|| ƒ} |jd7_|dkrŠd}|d kr˜tj}|d kr°|s¬td ƒ‚| S|rÈ|rÈt | | |¡} n&|rÚt | |¡} n|sât‚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ÚAssertionErrorÚ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|| }|dkr0qÄz| ||||ƒ}Wn`tk rh| s`| ƒYqúYqút k r¢}z| dkrŒt|ƒ‚|d‚W5d}~XYqúX|dkr²qÄ||7}| |7} qú| W¢S| dkrìt |dƒrì| |¡XdS)Nri@ú&non-blocking sockets are not supportedÚ PollSelectorÚseekz timed out)Ú_check_sendfile_paramsr3ÚAttributeErrorrYÚUnsupportedOperationr"ÚosÚfstatÚst_sizeÚOSErrorÚminrIrÚhasattrÚ selectorsrgZSelectSelectorÚregisterZ EVENT_WRITEZselectrerhr-ÚtimeoutÚBlockingIOError)r/ÚfileÚoffsetÚcountZsocknor3ÚerrZfsizeÚ blocksizertZselectorÚ total_sentZselector_selectZ os_sendfileÚsentrrrÚ_sendfile_use_sendfileYs^        zsocket._sendfile_use_sendfilecCs tdƒ‚dS)Nz,os.sendfile() not available on this platform)r"©r/rvrwrxrrrr}š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)Nrrfi rh) rirIrrhrpÚreadÚsendrqÚ memoryviewruÚlen) r/rvrwrxrzr{Z 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~rrrriÂ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~rrrreÏ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Œrrr1sz socket.typeÚntcCst | ¡¡Sr4)rlZget_handle_inheritabler3r5rrrÚget_inheritable szsocket.get_inheritablecCst | ¡|¡dSr4)rlZset_handle_inheritabler3©r/Z inheritablerrrÚset_inheritableszsocket.set_inheritablecCst | ¡¡Sr4)rlrŽr3r5rrrrŽscCst | ¡|¡dSr4)rlrr3rrrrrsz&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.r6r9rCrErGrNrdrqrlr}r„rirerˆ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ÚconnectruÚ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 e dd„ƒZ e dd„ƒZ dd„Z‡ZS)rXz¬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) rrYÚ 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­ror©Z recv_intortr@r8Ú_blocking_errnos©r/rTÚerrrÚreadintos 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©r€r@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)rArYr¨r7r©rˆr5rrrr7Üs   zSocketIO.close)r#r$r%r‘r.r³rµr·r¸r¹r3r“r”r_r7r•rrrŒrrXrs    rXr: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Ú.)ÚstripZ gethostnameZ gethostbyaddrr@Úinsert)r”ZhostnameÚaliasesZipaddrsrrrr çs   c CsÔ|\}}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)ÚaddressrtZsource_addressr£r¤ryÚ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_ipv6rqr-r&rr,Ú 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 t d¡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 kr:| ¡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)rqr-rrrr&r,rlr”rÉZ SOL_SOCKETrÏr@rÍrÈrÆrÇrŸÚstrerrorÚerrnor r7)rÀr0rÊrËrÌrKryÚ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-rlÚsysrYrrÚenumrrrÑÚ ImportErrorr<rrr Ú__all__ÚextendÚ_get_exports_listÚ _convert_r#rœržrr&Z _realsocketÚplatformÚlowerrr!rÓÚ Exceptionr"r rqr—r,r˜r+r°r¨rXr Úobjectr¿r rr r¾rrrrÚsH-      ÿýýýý  F   $ u ÿ -ÿ E