o
    ¨Ýj~  ã                   @   s¤   d dl Z d dlZedƒ ejd ZejZejg d¢ Zd dlmZ eee	ƒ e
eƒd� e j dd¡ ¡ dkrId d	lmZ ejZejZejZejZ[edfd
d„ZdS )é    Nzeventlet.green._socket_nodns)Úcreate_connectionÚgetaddrinfoÚgethostbynameÚgethostbyname_exÚgetnameinfo)Úslurp_properties)ZsrckeysZEVENTLET_NO_GREENDNSÚ Úyes)Úgreendnsc                 C   sÀ   d}| \}}t ||dtƒD ]G}|\}}}	}
}d}z t|||	ƒ}|tur(| |¡ |r/| |¡ | |¡ |W   S  tyT } z|}|durJ| ¡  W Y d}~qd}~ww t	|tƒs^t|ƒ}|‚)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.
    z!getaddrinfo returns an empty listr   N)
r   ÚSOCK_STREAMÚsocketÚ_GLOBAL_DEFAULT_TIMEOUTÚ
settimeoutÚbindÚconnectÚerrorÚcloseÚ
isinstance)ÚaddressÚtimeoutÚsource_addressÚerrÚhostÚportÚresÚafÚsocktypeÚprotoÚ	canonnameÚsaÚsockÚe© r"   úP/var/www/html/chatgpt/venv/lib/python3.10/site-packages/eventlet/green/socket.pyr      s,   



€ý
r   )ÚosÚsysÚ
__import__ÚmodulesZ__socketÚ__all__Z__patched__Zeventlet.patcherr   ÚglobalsÚdirÚenvironÚgetÚlowerZeventlet.supportr
   r   r   r   r   r   r   r"   r"   r"   r#   Ú<module>   s$    
þ