§
    Þa{c×  ã                   óT  — d Z ddlmZ ddlmZ ddlmZ ddlmZ erddlmZ	 nddlm
Z	 dxZxZxZxZZ G d	„ d
e¦  «        Zd„ Z ee	 e¦   «         dd¬¦  «         ddlmZ  ee e¦   «         ej        ¬¦  «         	 ej        Zn# e$ r  e¦   «         ZY nw xY wedfd„Zee	_        dS )a  Cooperative low-level networking interface.

This module provides socket operations and some related functions.
The API of the functions and classes matches the API of the corresponding
items in the standard :mod:`socket` module exactly, but the synchronous functions
in this module only block the current greenlet and let the others run.

For convenience, exceptions (like :class:`error <socket.error>` and :class:`timeout <socket.timeout>`)
as well as the constants from the :mod:`socket` module are imported into this module.
é    )ÚPY3)ÚPY311)Ú	exc_clear)Úcopy_globals)Ú_socket3)Ú_socket2© c                   ó   — e Zd ZdZdS )ÚerrorN)Ú__name__Ú
__module__Ú__qualname__Úerrnor	   ó    ú//usr/lib/python3/dist-packages/gevent/socket.pyr   r       s   € € € € € Ø€E€E€Er   r   c                  ó   — t          ¦   «         ‚)N)ÚNotImplementedError)Úargss    r   Úgetfqdnr   $   s   € å
Ñ
Ô
Ðr   )Ú__implements__Ú__dns__Ú__all__Ú__extensions__Ú__imports__Ú
__socket__F)Údunder_names_to_keepÚcleanup_globs)Ú_socketcommon)Ú
only_namesNc                 ó,  — d}t           r|                     dd¦  «        }|rt          d|¦  «        ‚| \  }}g }t          t	          ||dt
          ¦  «        ¦  «        }|st          d¦  «        ‚|D �]"}	|	\  }
}}}}d}	 t          |
||¦  «        }|t          ur| 	                    |¦  «         |r| 
                    |¦  «         |                     |¦  «         |dd…= 	 |d}c S # d}w xY w# t          $ ry}|s|g}n|                     |¦  «         ~|�|                     ¦   «          d}|	|d         u r#|s|dd…= ‚ 	 t          d|¦  «        ‚# |dd…= w xY wt          ¦   «          Y d}~Œúd}~wt           $ r |�|                     ¦   «          d}‚ w xY wdS )	a^  
    create_connection(address, timeout=None, source_address=None, *, all_errors=False) -> socket

    Connect to *address* and return the :class:`gevent.socket.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.

    .. versionchanged:: 20.6.0
        If the host part of the address includes an IPv6 scope ID,
        it will be used instead of ignored, if the platform supplies
        :func:`socket.inet_pton`.
    .. versionchanged:: 22.08.0
        Add the *all_errors* argument. This only has meaning on Python 3.11;
        it is a programming error to pass it on earlier versions.
    FÚ
all_errorsz/Too many keyword arguments to create_connectionr   z!getaddrinfo returns an empty listNéÿÿÿÿzcreate_connection failed)r   ÚpopÚ	TypeErrorÚlistÚgetaddrinfoÚSOCK_STREAMr   ÚsocketÚ_GLOBAL_DEFAULT_TIMEOUTÚ
settimeoutÚbindÚconnectÚappendÚcloseÚExceptionGroupr   ÚBaseException)ÚaddressÚtimeoutÚsource_addressÚkwargsr!   ÚhostÚportÚ
exceptionsÚaddrsÚresÚafÚsocktypeÚprotoÚ
_canonnameÚsaÚsockÚexcs                    r   Úcreate_connectionrA   ?   s:  € ð< €JÝð 5Ø—Z’Z ¨eÑ4Ô4ˆ
Øð SÝÐIÈ6ÑRÔRÐRð �J€Dˆ$Ø€Jõ •˜T 4¨­KÑ8Ô8Ñ9Ô9€EØð 9ÝÐ7Ñ8Ô8Ð8àð 3ñ 3ˆØ.1Ñ+ˆˆH�e˜Z¨Øˆð0	Ý˜"˜h¨Ñ.Ô.ˆDØÕ5Ð5Ð5Ø—’ Ñ(Ô(Ð(Øð *Ø—	’	˜.Ñ)Ô)Ð)Ø�LŠL˜ÑÔÐðL ˜1˜1˜1�ðØà����ø�t�����øõQ ð 	ð 	ð 	Øð 'Ø!˜U�
�
à×!Ò! #Ñ&Ô&Ð&ØØÐØ—
’
‘”�ØˆDØ�e˜B”iÐÐØ!ð Ø" 1 1 1˜Øð&Ý(Ð)CÀZÑPÔPÐPøð # 1 1 1˜Ð%Ð%Ð%Ð%õ ‰KŒKˆKˆKˆKˆKˆKˆKøøøøÝð 	ð 	ð 	ð ÐØ—
’
‘”�ØˆDØð	øøøðK3ð 3s8   Á>AC,ÃC%Ã%C)Ã,
FÃ6AE*Ä=EÅEÅE*Å*'F)Ú__doc__Úgevent._compatr   r   r   Úgevent._utilr   Úgeventr   Ú_sourcer   r   r   r   r   r   Ú	Exceptionr   r   Úglobalsr   r   r)   ÚAttributeErrorÚobjectrA   r	   r   r   ú<module>rK      s¹  ðð	ð 	ð Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  Ø $Ð $Ð $Ð $Ð $Ð $Ø %Ð %Ð %Ð %Ð %Ð %ð ð +Ø*Ð*Ð*Ð*Ð*Ð*Ð*à*Ð*Ð*Ð*Ð*Ð*ð EGÐ F€Ð F�Ð F˜7Ð F ^°kðð ð ð ð ˆIñ ô ð ð ð  ð  ð €ˆW�g�g‘i”ið#Rà ð"ñ "ô "ð "ð !Ð  Ð  Ð  Ð  Ð  Ø €ˆ]˜G˜G™IœIØ%Ô4ð6ñ 6ô 6ð 6ð'Ø(Ô@ÐÐøØð 'ð 'ð 'Ø$˜f™hœhÐÐÐð'øøøð (?Ètð `ð `ð `ð `ðL .€Ô Ð Ð s   Á>B ÂBÂB