Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
connection.cpython-313.pyc38 linesDownload Raw Back to __pycache__
1�

2��j\���SSKJr SSKrSSKrSSKJr SSKJrJr \	\3\\\R\\
44r\R(aSSKJr SSjr\SS4SS	jjrSS4jrSSjrSSjr\"S
5rg)�)�annotationsN�)�LocationParseError�)�_DEFAULT_TIMEOUT�
_TYPE_TIMEOUT)�BaseHTTPConnectionc�$�UR(+$)z�5Returns True if the connection is dropped and should be closed.6:param conn: :class:`urllib3.connection.HTTPConnection` object.7)�is_connected)�conns �]D:\code\apps\devtools\python\user_packages\Python313\site-packages\urllib3/util/connection.py�is_connection_droppedrs��8� � � � �c��UupEURS5(aURS5nSn[5nURS5 [R"XEU[R5HunUup�p�n
Sn[R"X�U5n[X�5 U[LaURU5 U(aURU5 URU
5 SnUs $ UbUe[S5e![a [SUS35Sef=f![a&nUnUbUR5 SnAM�SnAM�SnAff=f!Snf=f)aGConnect to *address* and return the socket object.9 10Convenience function.  Connect to *address* (a 2-tuple ``(host,11port)``) and return the socket object.  Passing the optional12*timeout* parameter will set the timeout on the socket instance13before attempting to connect.  If no *timeout* is supplied, the14global default timeout setting returned by :func:`socket.getdefaulttimeout`15is used.  If *source_address* is set it must be a tuple of (host, port)16for the socket to bind as a source address before making the connection.17An host of '' or port 0 tells the OS to use the default.18�[z[]N�idna�'z', label empty or too longz!getaddrinfo returns an empty list)�19startswith�strip�allowed_gai_family�encode�UnicodeErrorr�socket�getaddrinfo�SOCK_STREAM�_set_socket_optionsr�20settimeout�bind�connect�OSError�close)�address�timeout�source_address�socket_options�host�port�err�family�res�af�socktype�proto�	canonname�sa�sock�_s                r
�create_connectionr2sS��$�J�D����s����z�z�$���21�C�22 �
!�F�Q����F���!�!�$�f�f�6H�6H�I��-0�*��e����	��=�=��u�5�D�
 ��5��.�.�����(���	�	�.�)��L�L����C��K�!J�.��	��I�23�9�:�:��C�Q� �1�T�F�*D�!E�F�D�P�Q��*�	��C����24�25��� ��	���C�s0�C:�<A(D�-E�:D�26E�"E�E�Ec�<�UcgUHnUR"U6 M g)N)�27setsockopt)r0�options�opts   r
rr]s"������������rc�\�[Rn[(a[RnU$)z�This function is designed to work in the context of28getaddrinfo, where family=socket.AF_UNSPEC is the default and29will perform a DNS search for both IPv6 and IPv4 records.)r�AF_INET�HAS_IPV6�	AF_UNSPEC)r)s r
rrgs"��30�^�^�F��x��!�!���Mrc���SnSn[R(a:[R"[R5nURUS45 SnU(aUR5 U$![a N%f=f)z4Returns True if the system can bind an IPv6 address.NFrT)r�has_ipv6�AF_INET6r�	Exceptionr!)r&r0r<s   r
�	_has_ipv6r?rsf���D��H�
���	��=�=����1�D��I�I�t�Q�i� ��H���31�32���O���	��	�s�9A-�-33A:�9A:z::1)rr	�return�bool)34r"ztuple[str, int]r#rr$ztuple[str, int] | Noner%�_TYPE_SOCKET_OPTIONS | Noner@�
socket.socket)r0rCr5rBr@�None)r@zsocket.AddressFamily)r&�strr@rA)�35__future__rr�typing�36exceptionsrr#rr�list�tuple�int�Union�bytes�_TYPE_SOCKET_OPTIONS�
TYPE_CHECKING�_base_connectionr	rr2rrr?r9�rr
�<module>rRs���"�
�
�+�4��E�#�s�F�L�L��e��,D�"D�E�F��	���5�!�.�-1�26�	?;�
�?;�
�?;�+�?;�0�	?;�37�?;�D�38��"=��	����.�U��r
codekingpro/portable-devtools · Team Ai