+
    Brh                        R t ^ RIt^ RI5 ^ RIt^ RIt^ RIt^ RIHtHt  ^ RIt]
! ]R^	4      t]
! ]R^4      t]
! ]R^4      t. ROt]P                  ]P                   ! ]4      4       ]P"                  ! R]R	 4       ]P"                  ! R]R
 4       ]P"                  ! R]R 4       ]P"                  ! R]R 4       RtRtR t]P,                  P/                  4       P1                  R4      '       Ed1   / ^Rb^Rb^WRbRRbRRbRRbRRbRRbR R!bR"R#bR$R%bR&R'bR(R)bR*R+bR,R-bR.R/bR0R1b/ R2R3bR4R5bR6R7bR8R9bR:R;bR<R=bR>R?bR@RAbRBRCbRDREbRFRGbRHRIbRJRKbRLRMbRNRObRPRQbRRRSbC/ RTRUbRVRWbRXRYbRZR[bR\R]bR^R_bR`RabRbRcbRdRebRfRgbRhRibRjRkbRlRmbRnRobRpRqbRrRsbRtRubC/ RvRwbRxRybRzR{bR|R}bR~RbRRbRRbRRbRRbRRbRR{bRRbRRbRRbRRbRRbRRbC/ RRbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbCRRRRRRRRRRRRRRRRRRRR/
Ct]P5                  R4        ! R R]4      t ! R R]P:                  4      tRR lt]! ]P:                  R4      '       d   RR lt ]P5                  R4       ]! ]P:                  R4      '       d   RR lt!]P5                  R4       ]! ]P:                  R4      '       d   R t"]P5                  R4       ]#]$^ 3R lt%]! ]R4      '       d
   R]$^ 3R lt&M]%t&]P5                  R4       R]&n         ]]0t' ! R R]PP                  4      t)RR lt*]+! 4       t,],R3RR/R llt-R t.R]#RRRRRR/R lt/RR lt0R#   ]	 d    Rt EL;i ; i)a  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 [*]
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)*)IntEnumIntFlagEBADFEAGAINEWOULDBLOCKAddressFamily
SocketKindc                 T    V P                  4       ;'       d    V P                  R 4      # )AF_isupper
startswithCs   &#/usr/local/lib/python3.14/socket.py<lambda>r   Q       !))+55!,,u"55    c                 T    V P                  4       ;'       d    V P                  R 4      # )SOCK_r   r   s   &r   r   r   V   s    !))+77!,,w"77r   MsgFlagc                 T    V P                  4       ;'       d    V P                  R 4      # )MSG_r   r   s   &r   r   r   [   s    !))+66!,,v"66r   AddressInfoc                 T    V P                  4       ;'       d    V P                  R 4      # )AI_r   r   s   &r   r   r   `   r   r   z	127.0.0.1z::1c                :     V! V 4      #   \          d    T u # i ; i)zsConvert 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!   f   s&    
%   s   
 winz)Specified event object handle is invalid.zInsufficient memory available.z#One or more parameters are invalid.i  zOverlapped operation aborted.i  z2Overlapped I/O event object not in signaled state.i  z)Overlapped operation will complete later.i'  zThe operation was interrupted.i'  zA bad file handle was passed.i'  zPermission denied.i'  z!A fault occurred on the network??i&'  z#An invalid operation was attempted.i('  zToo many open files.i3'  z!The socket operation would block.i4'  z,A blocking operation is already in progress.i5'  zOperation already in progress.i6'  zSocket operation on nonsocket.i7'  zDestination address required.i8'  zMessage too long.i9'  zProtocol wrong type for socket.i:'  zBad protocol option.i;'  zProtocol not supported.i<'  zSocket type not supported.i='  zOperation not supported.i>'  zProtocol family not supported.i?'  z0Address family not supported by protocol family.i@'  zThe network address is in use.iA'  z Cannot assign requested address.iB'  zNetwork is down.iC'  zNetwork is unreachable.iD'  z$Network dropped connection on reset.iE'  z!Software caused connection abort.iF'  zThe connection has been reset.iG'  zNo buffer space available.iH'  zSocket is already connected.iI'  zSocket is not connected.iJ'  zThe network has been shut down.iK'  zToo many references.iL'  zThe operation timed out.iM'  zConnection refused.iN'  zCannot translate name.iO'  zThe name is too long.iP'  zThe host is down.iQ'  zThe host is unreachable.iR'  zDirectory not empty.iS'  zToo many processes.iT'  zUser quota exceeded.iU'  zDisk quota exceeded.iV'  zStale file handle reference.iW'  zItem is remote.ik'  z!Network subsystem is unavailable.il'  z!Winsock.dll version out of range.im'  z(Successful WSAStartup not yet performed.iu'  zGraceful shutdown in progress.iv'  z*No more results from WSALookupServiceNext.iw'  zCall has been canceled.ix'  z Procedure call table is invalid.iy'  zService provider is invalid.iz'  z&Service provider failed to initialize.i{'  zSystem call failure.i|'  zService not found.i}'  zClass type not found.i~'  i'  zCall was canceled.i'  zDatabase query was refused.i*  zHost not found.i*  z Nonauthoritative host not found.i*  zThis is a nonrecoverable error.i*  z*Valid name, no data record requested type.i*  zQoS receivers.i*  zQoS senders.i*  zNo QoS senders.i +  zQoS no receivers.i+  zQoS request confirmed.i+  zQoS admission error.i+  zQoS policy failure.i+  zQoS bad style.i+  zQoS bad object.i+  zQoS traffic control error.i+  zQoS generic error.i+  zQoS service type error.i	+  zQoS flowspec error.i
+  zInvalid QoS provider buffer.i+  zInvalid QoS filter style.i+  i+  zIncorrect QoS filter count.i+  zInvalid QoS object length.i+  zIncorrect QoS flow count.i+  zUnrecognized QoS object.i+  zInvalid QoS policy object.i+  zInvalid 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.errorTabc                       ] tR t^tRtR# )_GiveupOnSendfile N)__name__
__module____qualname____firstlineno____static_attributes__r&   r   r   r%   r%      s    Dr   r%   c                     a a ] tR t^t oRt. R"OtR#R ltR tR tR t	R t
R tR	 tR$R
RRRRR/R llt]! ]R4      '       d   R%R ltMR%R ltR%R ltR tR%R ltR t]P,                  3R ltR tV 3R lt]V 3R l4       t]V 3R l4       t]P:                  R8X  d   R tR tMR tR tR]n        R ]n        R!t Vt!V ;t"# )&socketz:A subclass of _socket.socket adding the makefile() method.Nc                    Vf$   VR8X  d   \         pVR8X  d   \        pVR8X  d   ^ p\        P                  P	                  WW#V4       ^ V n        RV n        R # )NF)AF_INETSOCK_STREAM_socketr-   __init___io_refs_closed)selffamilytypeprotofilenos   &&&&&r   r3   socket.__init__   sQ    
 >| rz"{d6Br   c                    V # Nr&   r6   s   &r   	__enter__socket.__enter__   s    r   c                N    V P                   '       g   V P                  4        R # R # r=   )r5   close)r6   argss   &*r   __exit__socket.__exit__   s    |||JJL r   c                B   \        V RR4      pRV P                  P                  V P                  P                  V'       d   RMRV P	                  4       V P
                  V P                  V P                  3,          pV'       ge    V P                  4       pV'       d   VR\        V4      ,          ,          p T P                  4       pT'       d   TR\        T4      ,          ,          pVR,          pV#   \        \        3 d     LPi ; i  \        \        3 d     L5i ; i)	zFWrap __repr__() to reveal the real class name and socket
address(es).
r5   Fz,<%s.%s%s fd=%i, family=%s, type=%s, proto=%iz	 [closed] z
, laddr=%sz
, raddr=%s>)getattr	__class__r(   r)   r:   r7   r8   r9   getsocknamestrerrorAttributeErrorgetpeername)r6   closedsladdrraddrs   &    r   __repr__socket.__repr__   s     y%0:~~((~~**${"{{}{{yyzz ((*E
22A((*E
22A 	
S >*  >* s0   C3 C3 7D
 D
 3DD
DDc                J    \        R V P                  P                  : R24      h)zcannot pickle z object)	TypeErrorrJ   r'   r>   s   &r   __getstate__socket.__getstate__  s!    .)@)@(C7KLLr   c                    \        V P                  4       4      pV P                  V P                  V P                  V P
                  VR7      pVP                  V P                  4       4       V# )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:   rJ   r7   r8   r9   
settimeout
gettimeout)r6   fdsocks   &  r   r\   
socket.dup  sN     ~~dkk499djj~L)*r   c                    V P                  4       w  r\        V P                  V P                  V P                  VR7      p\        4       f(   V P                  4       '       d   VP                  R4       W23# )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)_acceptr-   r7   r8   r9   getdefaulttimeoutr^   setblocking)r6   r_   addrr`   s   &   r   acceptsocket.accept#  sZ     <<>dkk499djjD &4??+<+<T"zr   encodingerrorsnewlinec                  \        V4      0 Rm8:  g   \        RV: R24      hRV9   pRV9   ;'       g    V'       * pV'       g   V'       g   Q hRV9   pRp	V'       d
   V	R,          p	V'       d
   V	R,          p	\        W	4      p
V ;P                  ^,          un        Vf   R	pV^ 8  d   \        P
                  pV^ 8X  d   V'       g   \        R4      hV
# V'       d!   V'       d   \        P                  ! WV4      pM?V'       d   \        P                  ! W4      pM V'       g   Q h\        P                  ! W4      pV'       d   V# \        P                  ! V4      p\        P                  ! WWE4      pWn        V# )
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', 'b', or a combination of
those.
rwbzinvalid mode z (only r, w, b allowed)rG   z!unbuffered streams must be binary>   ro   rm   rn   r/   )setr   SocketIOr4   ioDEFAULT_BUFFER_SIZEBufferedRWPairBufferedReaderBufferedWritertext_encodingTextIOWrappermode)r6   ry   	bufferingri   rj   rk   writingreadingbinaryrawmoderawbuffertexts   &&&$$$       r   makefilesocket.makefile3  s0    4yO+OPP++,,W'!!sNGsNGt%Iq=..I> !DEEJw&&s;F&&s6FN7&&s6FM##H-&B	r   sendfilec                   ^ RI pV P                  WV4       V P                  4       p VP                  4       p \        P                  ! T4      P                  pT'       g   ^ # \        T;'       g    TR4      p	T P                  4       p
T
^ 8X  d   \        R4      h\        TR4      '       d   TP                  4       pMTP!                  4       pTP#                  YTP$                  4       ^ pTP&                  p\        P(                  p  T
'       d   T! T
4      '       g   \+        R4      hT'       d   \        Y<,
          T	4      p	T	^ 8:  d   M$ T! YVY)4      pT^ 8X  d   MY/,          pY,          pKh  TT^ 8  d&   \        TR4      '       d   TP/                  T4       # # #   \        \        P
                  3 d   p\        T4      hRp?ii ; i  \         d   p\        T4      hRp?ii ; i  \,         d    T
'       g   T! 4         K  \         d   pT^ 8X  d   \        T4      hTRhRp?ii ; i  T^ 8  d&   \        TR4      '       d   TP/                  T4       i i i ; i)    N&non-blocking sockets are not supportedPollSelectorz	timed outseeki   @)	selectors_check_sendfile_paramsr:   rN   rr   UnsupportedOperationr%   osfstatst_sizeOSErrorminr^   r   hasattrr   SelectSelectorregisterEVENT_WRITEselectr   TimeoutErrorBlockingIOErrorr   )r6   fileoffsetcountr   socknor:   errfsize	blocksizetimeoutselector
total_sentselector_selectos_sendfilesents   &&&&            r   _sendfile_use_sendfilesocket._sendfile_use_sendfilea  s   ''e<[[]F--(00 ENNUG4Ioo'G!| !IJJ y.11$113$335f&;&;<J&ooO++K &w'?'?*;77$'(:I$F	$>!+*66M   19!"*
!>gdF&;&;IIf% '<>s #B$;$;< -',,-  -',,-@ + !& ,- " ,%?
 #4C"88!t+, >gdF&;&;IIf% '<>s   F  G H. H. H. 2H. 	G* H. G	9GG	G'G""G'*H+=H+H. H+H+H&&H++H. ..Ic                    \        R 4      h)z,os.sendfile() not available on this platform)r%   r6   r   r   r   s   &&&&r   r   r     s    #>@ @r   c                   V P                  WV4       V P                  4       ^ 8X  d   \        R4      hV'       d   VP                  V4       V'       d   \	        VR4      MRp^ pVP
                  pV P                  p  V'       d   \	        W5,
          V4      pV^ 8:  d   MD\        V! V4      4      pV'       g   M*  V! V4      p	WY,          pV	\        V4      8  d   WR pK(  Kg  TV^ 8  d,   \        VR4      '       d   VP                  W%,           4       # # #   \         d     Kl  i ; i  T^ 8  d,   \        TR4      '       d   TP                  Y%,           4       i i i ; i)r   r   i    Nr   )r   r^   r   r   r   readsend
memoryviewlenr   r   )
r6   r   r   r   r   r   	file_read	sock_senddatar   s
   &&&&      r   _sendfile_use_sendsocket._sendfile_use_send  s;   ##D%8??!EFFIIf(-Ct$4	
II	II		/ #E$6	 BI A~!)I"67	"( #*
#d)+#';D!A~'$"7"7		&-. #8~ + ! ! A~'$"7"7		&-. #8~s6   =D* 5D* <D !D* D'#D* &D''D* *4Ec                >   R \        VRR 4      9  d   \        R4      hV P                  \        ,          '       g   \        R4      hVeT   \	        V\
        4      '       g   \        RP                  V4      4      hV^ 8:  d   \        RP                  V4      4      hR# R# )ro   ry   z$file should be opened in binary modez+only SOCK_STREAM type sockets are supportedNz+count must be a positive integer (got {!r}))rI   r   r8   r1   
isinstanceintrW   formatr   s   &&&&r   r   socket._check_sendfile_params  s    gdFC00CDDyy;&&JKKeS))AHHOQ Qz AHHOQ Q 	 r   c                n     V P                  WV4      #   \         d    T P                  YT4      u # i ; i)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.
)r   r%   r   r   s   &&&&r   r   socket.sendfile  s?    $	@..tUCC  	@**4??	@s    44c                    V P                   ^ 8  d   V ;P                   ^,          un         V P                  '       d   V P                  4        R# R# r   N)r4   r5   rB   r>   s   &r   _decref_socketiossocket._decref_socketios  s3    ==1MMQM<<<JJL r   c                (    VP                  V 4       R # r=   )rB   )r6   _sss   &&r   _real_closesocket._real_close  s    		$r   c                Z    R V n         V P                  ^ 8:  d   V P                  4        R# R# )TN)r5   r4   r   r>   s   &r   rB   socket.close  s&    ==A r   c                .   < RV n         \        SV `	  4       # )zdetach() -> 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)r5   superdetachr6   rJ   s   &r   r   socket.detach  s     w~r   c                4   < \        \        SV `  \        4      # )z@Read-only access to the address family for this socket.
        )r!   r   r7   r   r   s   &r   r7   socket.family  s     "%'.-@@r   c                4   < \        \        SV `  \        4      # )z-Read-only access to the socket type.
        )r!   r   r8   r	   r   s   &r   r8   socket.type  s     "%',
;;r   ntc                J    \         P                  ! V P                  4       4      # r=   )r   get_handle_inheritabler:   r>   s   &r   get_inheritablesocket.get_inheritable  s    ,,T[[];;r   c                P    \         P                  ! V P                  4       V4       R # r=   )r   set_handle_inheritabler:   r6   inheritables   &&r   set_inheritablesocket.set_inheritable  s    %%dkkm[Ar   c                J    \         P                  ! V P                  4       4      # r=   )r   r   r:   r>   s   &r   r   r     s    %%dkkm44r   c                P    \         P                  ! V P                  4       V4       R # r=   )r   r   r:   r   s   &&r   r   r     s    t{{}k:r   z&Get the inheritable flag of the socketz&Set the inheritable flag of the socket)r5   r4   )__weakref__r4   r5   )r/   r/   r/   N)rm   Nr   )#r'   r(   r)   r*   __doc__	__slots__r3   r?   rD   rT   rX   r\   rg   r   r   r   r   r   r   r   r   r2   r-   r   rB   r   propertyr7   r8   namer   r   r+   __classdictcell____classcell__rJ   __classdict__s   @@r   r-   r-      s     D6I <M	 **'+*59*X r:B	&H	@"/HQ@. &nn   A A
 < <
 
ww$	<	B	5	;FOFOr   r-   c                0    \        V 4      p\        WW44      # )zfromfd(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().
)r\   r-   )r_   r7   r8   r9   nfds   &&&& r   fromfdr   $  s     b'C&++r   sendmsgc           	         ^ RI pV P                  V\        P                  \        P                  VP                  RV4      3.4      # )z{send_fds(sock, buffers, fds[, flags[, address]]) -> integer

Send the list of file descriptors fds over an AF_UNIX socket.
Ni)arrayr   r2   
SOL_SOCKET
SCM_RIGHTS)r`   buffersfdsflagsaddressr   s   &&&&& r   send_fdsr   .  sB    
 	||Gw'9'9C 5'7 &8 9 	9r   r   recvmsgc           	        ^ RI pVP                  R4      pV P                  V\        P                  ! W%P                  ,          4      4      w  rgr8V Fr  w  rpV	\        P
                  8X  g   K  V
\        P                  8X  g   K4  VP                  VR\        V4      \        V4      VP                  ,          ,
           4       Kt  	  V\        V4      W83# )zrecv_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.
Nr   )
r   r   r2   CMSG_LENitemsizer   r   	frombytesr   list)r`   bufsizemaxfdsr   r   r   msgancdatarf   
cmsg_level	cmsg_type	cmsg_datas   &&&&        r   recv_fdsr   :  s     	 kk#$(LLVll23%5!e07,J9g000Y'BTBT5Ti )II#i.3<<*GHJ K 18
 DIu**r   r   sharec                    \        ^ ^ ^ V 4      # )znfromshare(info) -> socket object

Create a socket object from the bytes object returned by
socket.share(pid).
)r-   )infos   &r   	fromsharer  P  s     aAt$$r   r  c                    V \         8X  d   \        pMV \        8X  d   \        pM\	        R 4      hV\
        8w  d   \	        R4      hV^ 8w  d   \	        R4      h\        WV4      p VP                  V^ 34       VP                  4        VP                  4       R,          w  rV\        WV4      p VP                  R4        VP                  WV34       VP                  R4       VP                  4       w  r TP                  4         TP                  4       TP!                  4       8w  g$   TP                  4       TP!                  4       8w  d   \#        R4      h Y3#   \        \        3 d     Li ; i   TP                  4        h ; i  TP                  4        i ; i   TP                  4        TP                  4        h ; i)z?Only AF_INET and AF_INET6 socket address families are supportedz)Only SOCK_STREAM socket type is supportedzOnly protocol zero is supported:N   NFTzUnexpected peer connection)r0   
_LOCALHOSTAF_INET6_LOCALHOST_V6r   r1   r-   bindlistenrK   re   connectr   InterruptedErrorrg   rB   rO   ConnectionError)
r7   r8   r9   hostlsockrf   portcsockssock_s
   &&&       r   _fallback_socketpairr  \  s   	8	 ) * 	*{DEEz:;; 6'E

D!9&&(,
vU+
	e$tl+ d#||~HE1
 	
5#4#4#66  "e&7&7&99!">?? : >5 $%56 	KKM 	sP   %AF	 .E3  E #E3 AF E0-E3 /E00E3 3FF	 	F#G
socketpairc                     V f    \         p \        P                  ! WV4      w  r4\        WW#P                  4       4      p\        WW$P                  4       4      pW43#   \         d
    \        p  Lci ; ir=   )AF_UNIX	NameErrorr0   r2   r  r-   r   )r7   r8   r9   aro   s   &&&  r   r  r    sh    >!  !!&66
36
3t  ! !s   A A0/A0a8  socketpair([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.
c                      a a ] tR tRt oRtR tR tR tR tR t	V 3R lt
R	 t]R
 4       t]R 4       tR tRtVtV ;t# )rq   i  zRaw 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                    VR9  d   \        RV,          4      h\        P                  P                  V 4       Wn        RV9  d
   VR,          pW n        R V9   V n        RV9   V n        RV n        R# )rm   rn   zinvalid mode: %rro   FN)rm   rn   rwrbwbrwb)	r   rr   	RawIOBaser3   _sock_mode_reading_writing_timeout_occurred)r6   r`   ry   s   &&&r   r3   SocketIO.__init__  sf    ::/$677
d#
d?CKD
tt!&r   c                6   V P                  4        V P                  4        V P                  '       d   \        R4      h V P                  P                  V4      #   \         d
    RT n        h \         d"   pTP                  \        9   d    Rp?R# h Rp?ii ; i)a  Read 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_checkReadabler%  r   r!  	recv_intor   rM   errno_blocking_errnosr6   ro   es   && r   readintoSocketIO.readinto  s     	!!!=>>	::''** 	%)D" 	ww**	s#   A B6B7BBBc                    V P                  4        V P                  4         V P                  P                  V4      #   \         d"   pTP
                  \        9   d    Rp?R# h Rp?ii ; i)zWrite 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(  _checkWritabler!  r   rM   r+  r,  r-  s   && r   writeSocketIO.write  sW     		::??1%% 	ww**		s   = A)A$#A$$A)c                T    V P                   '       d   \        R4      hV P                  # )z2True if the SocketIO is open for reading.
        I/O operation on closed socket.)rP   r   r#  r>   s   &r   readableSocketIO.readable  #     ;;;>??}}r   c                T    V P                   '       d   \        R4      hV P                  # )z2True if the SocketIO is open for writing.
        r6  )rP   r   r$  r>   s   &r   writableSocketIO.writable  r9  r   c                Z   < V P                   '       d   \        R4      h\        SV `  4       # )z2True if the SocketIO is open for seeking.
        r6  )rP   r   r   seekabler   s   &r   r>  SocketIO.seekable  s(     ;;;>??w!!r   c                V    V P                  4        V P                  P                  4       # )z=Return the file descriptor of the underlying socket.
        )r(  r!  r:   r>   s   &r   r:   SocketIO.fileno  s#     	zz  ""r   c                J    V P                   '       g   V P                  4       # R# )   r/   )rP   r:   r>   s   &r   r   SocketIO.name	  s    {{{;;= Ir   c                    V P                   # r=   )r"  r>   s   &r   ry   SocketIO.mode  s    zzr   c                    V P                   '       d   R# \        P                  P                  V 4       V P                  P                  4        RV n        R# )zwClose the SocketIO object.  This doesn't close the underlying
socket, except if all references to it have disappeared.
N)rP   rr   r   rB   r!  r   r>   s   &r   rB   SocketIO.close  s9     ;;;
4 

$$&
r   )r"  r#  r!  r%  r$  )r'   r(   r)   r*   r   r3   r/  r3  r7  r;  r>  r:   r   r   ry   rB   r+   r   r   r   s   @@r   rq   rq     s_     
', "#     r   rq   c                    V P                  4       p V '       d   V R9   d   \        4       p  \        V 4      w  rpVP                  ^ V4       V F  p RV 9   g   K   V # 	  Tp  V #   \         d     T # i ; i)ab  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 and `name`
was given, it is returned unchanged. If `name` was empty, '0.0.0.0' or '::',
hostname from gethostname() is returned.
.)z0.0.0.0z::)stripgethostnamegethostbyaddrinsertrM   )r   hostnamealiasesipaddrss   &   r   getfqdnrR    s     ::<D4,,}
%24%8"7 	q(#Dd{ K  DK   Ks   A# #A21A2
all_errorsFc               n   V w  rE. p\        WE^ \        4       Fo  pVw  rrpRp \        WV
4      pV\        Jd   VP	                  V4       V'       d   VP                  V4       VP                  V4       VP                  4        Vu # 	  \        V4      '       d    V'       g
   V^ ,          h\        RV4      h\        R4      h  \         dP   pT'       g   TP                  4        TP                  T4       Te   TP                  4         Rp?K   Rp?EK  Rp?ii ; i  TP                  4        i ; i)a  Connect 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.
Nzcreate_connection failedz!getaddrinfo returns an empty list)getaddrinfor1   r-   _GLOBAL_DEFAULT_TIMEOUTr]   r	  r  clearrM   appendrB   r   ExceptionGroup)r   r   source_addressrS  r  r  
exceptionsresafsocktyper9   	canonnamesar`   excs   &&&$           r   create_connectionrb  <  s     JDJ4q+6-0*e	".D55(		.)LLK 7* :	 m# !;ZHH
 788!  	  "c"

  		 s/   .C3CD" %D" D=DD"D4c                 J   \         '       d-   \        \        R4      '       d   \        \        R4      '       g   R#  \        \        \
        4      ;_uu_ 4       p V P                  \        \        ^ 4        RRR4       R#   + '       g   i     R# ; i  \         d     R# i ; i)zReturn 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_V6ONLYFNT)
has_ipv6r   r2   r-   r  r1   
setsockoptrd  re  rM   )r`   s    r   has_dualstack_ipv6rh  o  so     87N337M22Hk**dOOL+q9 +***  s/   B A?5B ?B	
B B B"!B"r7   backlog
reuse_portdualstack_ipv6c               6   V'       d"   \        \        R4      '       g   \        R4      hV'       d2   \        4       '       g   \        R4      hV\        8w  d   \        R4      h\        V\        4      p \        P                  R9  d3   \        \        R4      '       d    VP                  \        \        ^4       V'       d-   V\        \        39   d   VP                  \        \        ^4       \        '       dw   V\        8X  dl   V'       d   VP                  \         \"        ^ 4       MG\        \        R4      '       d2   \        \        R4      '       d   VP                  \         \"        ^4        VP%                  V 4       Tf   TP+                  4        T# TP+                  T4       T#   \         d     Li ; i  \         d1   pTP&                  : RT : R	2p\        TP(                  T4      R
hR
p?ii ; i  \         d    TP-                  4        h i ; i)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SO_REUSEADDRre  rd  z& (while attempting to bind on address )N)r   cygwin)r   r2   r   rh  r  r-   r1   r   r   rg  r   rn  rM   r0   rm  rf  rd  re  r	  strerrorr+  r
  rB   )r   r7   ri  rj  rk  r`   r   r   s   &$$$$   r   create_serverrr    s   & ''>::FGG!##LMMXFGG&+&D) 77**00
L!< &Wh$77OOJa88(*k1=-00G^44k1=	2IIg
 ?KKM  KK 1      	2w(C		3'T1	2  

sm   4+G;  F, ;G; 7G; ;G; A#G; 2F= G; G; ,F:7G; 9F::G; =G8+G33G88G; ;Hc                    . p\         P                  ! WW#WE4       F:  pVw  rrJpVP                  \        V\        4      \        V	\
        4      WJV34       K<  	  V# )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.
)r2   rU  rX  r!   r   r	   )r  r  r7   r8   r9   r   addrlistr\  r]  r^  r_  r`  s   &&&&&&      r   rU  rU    s`      H""4vUJ-0*e+B>+HjA2/ 	0 K
 Or   )r   rR  rb  rr  rh  r   r	   )r   r   )rG   )r   r   r   r   )1r   r2   rr   r   sysenumr   r   r+  ImportErrorrI   r   r   r   __all__extend_get_exports_list	_convert_r'   r  r  r!   platformlowerr   r#   rX  	Exceptionr%   r-   r   r   r   r   r  r0   r1   r  r  r,  r   rq   rR  objectrV  rb  rh  rr  rU  r&   r   r   <module>r     s  .`   	 	 
 ! 	w"	"	%e]B/@ r##G, -   57
   79
   68
   57
 
 <<""5))`	6`	+` 	1` 	,	`
 	A` 	8` 	/` 	.` 	#` 	2` 	4` 	%` 	2` 	=` 	/`  	/!`" 	.#`$ 	"%`& 	0'`( 	%)`* 	(+`, 	+-`. 	)/`0 	/1`2 	A3`4 	/5`6 	17`8 	!9`: 	(;`< 	5=`> 	2?`@ 	/A`B 	+C`D 	-E`F 	)G`H 	0I`J 	%K`L 	)M`N 	$O`P 	'Q`R 	&S`T 	"U`V 	)W`X 	%Y`Z 	$[`\ 	%]`^ 	%_`` 	-a`b 	 c`d 	2e`f 	2g`h 	9i`j 	/k`l 	;m`n 	(o`p 	1q`r 	-s`t 	7u`v 	%w`x 	#y`z 	&{`| 	;}`~ 	#`@ 	,A`B 	 C`D 	1E`F 	0G`H 	;I`J 	K`L 	~M`N 	 O`P 	"Q`R 	'S`T 	%U`V 	$W`X 	Y`Z 	 [`\ 	+]`^ 	#_`` 	(a`b 	$c`d 	-e`f 	*g`h 	*i`j 	,k`l 	+*)+-8:712`HB NN: )	 (HGW^^ HGT
, 7>>9%%9 NN:
7>>9%%+& NN:
7>>7##% NN;
 !(k 4l 7L!![ 	 &JNN< 
  [* qr|| qh6 !( '>%)099>09f DW Dd Du D!&DNQ  Es   M 	M! M!