%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
a
�_g� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ d Z Z
Z ZZ
G dd� de�Zd d
� Zeee� ddd
� ddlmZ eee� ejd� z
ejZW n ey� e� ZY n0 edfdd�dd�Zee_dS )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.
� )�PY311)� exc_clear)�copy_globals)�_socket3� c @ s e Zd ZdZdS )�errorN)�__name__�
__module__�__qualname__�errnor r r �:/vddos/python/lib/python3.9/site-packages/gevent/socket.pyr s r c G s
t � �d S )N)�NotImplementedError)�argsr r r �getfqdn# s r )�__implements__�__dns__�__all__�__extensions__�__imports__�
__socket__F)Zdunder_names_to_keepZ
cleanup_globs)�
_socketcommon)Z
only_namesN)�
all_errorsc
C sv t sd}| \}}g }tt||dt��}|s2td��|D �]8}|\} }
}}}
d}z:t| |
|�}|turn|�|� |r||�|� |� |
� W n� t�y$ } z�|s�|g}n
|�
|� ~|dur�|�� d}||d u �r
|s�|dd�= � ztd|��W |dd�= n|dd�= 0 t
� W Y d}~q6d}~0 t�yN |du�rD|�� d}� Y q60 |dd�= z|W d} S d}0 q6dS )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.
.. versionchanged:: 23.7.0
You can pass a value for ``all_errors`` on any version of Python.
It is forced to false for any version before 3.11 inside the function.
Fr z!getaddrinfo returns an empty listN���zcreate_connection failed)r �list�getaddrinfo�SOCK_STREAMr �socket�_GLOBAL_DEFAULT_TIMEOUT�
settimeout�bind�connect�append�closeZExceptionGroupr �
BaseException)�address�timeout�source_addressr �host�port�
exceptions�addrs�res�af�socktype�protoZ
_canonname�sa�sock�excr r r �create_connection>