§
    (U en  ã                  óî   — d dl mZ d dlZd dlZddlmZ ddlmZmZ ej	        ej
        eeej        eef         f                  Zej        rddlmZ d!d„Zeddfd"d„Zd#d„Zd$d„Zd%d„Z ed ¦  «        ZdS )&é    )ÚannotationsNé   )ÚLocationParseErroré   )Ú_DEFAULT_TIMEOUTÚ_TYPE_TIMEOUT)ÚBaseHTTPConnectionÚconnr	   ÚreturnÚboolc                ó   — | j          S )z�
    Returns True if the connection is dropped and should be closed.
    :param conn: :class:`urllib3.connection.HTTPConnection` object.
    )Úis_connected)r
   s    ú[/var/www/dev/btcams2023/python_venv/lib/python3.11/site-packages/urllib3/util/connection.pyÚis_connection_droppedr      s   € ð
 Ô Ð Ð ó    Úaddressútuple[str, int]Útimeoutr   Úsource_addressútuple[str, int] | NoneÚsocket_optionsú_TYPE_SOCKET_OPTIONS | Noneúsocket.socketc                óÎ  — | \  }}|                      d¦  «        r|                     d¦  «        }d}t          ¦   «         }	 |                     d¦  «         n"# t          $ r t          d|› d�¦  «        d‚w xY wt          j        |||t          j        ¦  «        D ]±}|\  }	}
}}}d}	 t          j        |	|
|¦  «        }t          ||¦  «         |t          ur|                     |¦  «         |r|                     |¦  «         |                     |¦  «         d}|c S # t          $ r"}|}|�|                     ¦   «          Y d}~Œªd}~ww xY w|�
	 |‚# d}w xY wt          d¦  «        ‚)ak  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:`socket.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.
    An host of '' or port 0 tells the OS to use the default.
    ú[z[]NÚidnaú'z', label empty or too longz!getaddrinfo returns an empty list)Ú
startswithÚstripÚallowed_gai_familyÚencodeÚUnicodeErrorr   ÚsocketÚgetaddrinfoÚSOCK_STREAMÚ_set_socket_optionsr   Ú
settimeoutÚbindÚconnectÚOSErrorÚclose)r   r   r   r   ÚhostÚportÚerrÚfamilyÚresÚafÚsocktypeÚprotoÚ	canonnameÚsaÚsockÚ_s                   r   Úcreate_connectionr8      sÂ  € ð$ �J€Dˆ$Ø‡‚�sÑÔð  Ø�zŠz˜$ÑÔˆØ
€Cõ
  Ñ!Ô!€FðQØ�Š�FÑÔÐÐøÝð Qð Qð QÝ Ð!E TÐ!EÐ!EÐ!EÑFÔFÈDÐPðQøøøõ Ô! $¨¨fµfÔ6HÑIÔIð ð ˆØ-0Ñ*ˆˆH�e˜Y¨Øˆð	Ý”=  X¨uÑ5Ô5ˆDõ    nÑ5Ô5Ð5àÕ.Ð.Ð.Ø—’ Ñ(Ô(Ð(Øð *Ø—	’	˜.Ñ)Ô)Ð)Ø�LŠL˜ÑÔÐàˆCØˆKˆKˆKøåð 	ð 	ð 	ØˆCØÐØ—
’
‘”�øøøøøøøøøð	øøøð
 €ð	ØˆIøð ˆCˆJˆJˆJˆJåÐ9Ñ:Ô:Ð:s1   ÁA ÁA6Â'A3DÄ
E	Ä'EÅE	ÅE ÅEr6   ÚoptionsÚNonec                ó,   — |€d S |D ]} | j         |Ž  Œd S )N)Ú
setsockopt)r6   r9   Úopts      r   r&   r&   ]   s9   € ð €Øˆàð ð ˆØˆŒ˜ÐÐÐðð r   úsocket.AddressFamilyc                 óD   — t           j        } t          rt           j        } | S )z³This function is designed to work in the context of
    getaddrinfo, where family=socket.AF_UNSPEC is the default and
    will perform a DNS search for both IPv6 and IPv4 records.)r#   ÚAF_INETÚHAS_IPV6Ú	AF_UNSPEC)r/   s    r   r    r    g   s    € õ
 Œ^€FÝð "ÝÔ!ˆØ€Mr   r,   Ústrc                óä   — d}d}t           j        rI	 t          j         t           j        ¦  «        }|                     | df¦  «         d}n# t          $ r Y nw xY w|r|                     ¦   «          |S )z4Returns True if the system can bind an IPv6 address.NFr   T)r#   Úhas_ipv6ÚAF_INET6r(   Ú	Exceptionr+   )r,   r6   rE   s      r   Ú	_has_ipv6rH   r   s…   € à€DØ€Hå„ð ð	Ý”=¥¤Ñ1Ô1ˆDØ�IŠI�t˜Q�iÑ Ô Ð ØˆHˆHøÝð 	ð 	ð 	ØˆDð	øøøð ð Ø�
Š
‰ŒˆØ€Os   ’7A
 Á

AÁAz::1)r
   r	   r   r   )
r   r   r   r   r   r   r   r   r   r   )r6   r   r9   r   r   r:   )r   r>   )r,   rC   r   r   )Ú
__future__r   r#   ÚtypingÚ
exceptionsr   r   r   r   ÚSequenceÚTupleÚintÚUnionÚbytesÚ_TYPE_SOCKET_OPTIONSÚTYPE_CHECKINGÚ_base_connectionr	   r   r8   r&   r    rH   rA   © r   r   ú<module>rU      s!  ðØ "Ð "Ð "Ð "Ð "Ð "à €€€Ø €€€à +Ð +Ð +Ð +Ð +Ð +Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4à” v¤|°C¸¸f¼lÈ3ÐPUÈ:Ô>VÐ4VÔ'WÔXÐ à	Ôð 6Ø5Ð5Ð5Ð5Ð5Ð5ð!ð !ð !ð !ð .Ø-1Ø26ð	?;ð ?;ð ?;ð ?;ð ?;ðDð ð ð ðð ð ð ðð ð ð ð. ˆ9�UÑÔ€€€r   