HEX
Server: LiteSpeed
System: Linux srv146.niagahoster.com 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
User: kodi1989 (1633)
PHP: 8.1.34
Disabled: symlink,shell_exec,exec,popen,system,dl,passthru,escapeshellarg,escapeshellcmd,show_source,pcntl_exec
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/dns/__pycache__/asyncbackend.cpython-37.pyc
B

��f��@s�UddlmZddlZddlmZmZmZmZda	iZ
eeefed<dZ
Gdd�dejj�Zeed�d	d
�Zed�dd
�Zed�dd�Zeed�dd�ZdS)�)�DictN)�Socket�DatagramSocket�StreamSocket�Backend�	_backendsFc@seZdZdS)�AsyncLibraryNotFoundErrorN)�__name__�
__module__�__qualname__�rr�A/opt/alt/python37/lib/python3.7/site-packages/dns/asyncbackend.pyrsr)�name�returncCs�t�|�}|r|S|dkr.ddl}|j��}nF|dkrJddl}|j��}n*|dkrfddl}|j��}nt	d|����|t|<|S)z�Get the specified asynchronous backend.

    *name*, a ``str``, the name of the backend.  Currently the "trio",
    "curio", and "asyncio" backends are available.

    Raises NotImplementError if an unknown backend name is specified.
    ZtriorNZcurio�asynciozunimplemented async backend )
r�getZdns._trio_backendZ
_trio_backendrZdns._curio_backendZ_curio_backendZdns._asyncio_backendZ_asyncio_backend�NotImplementedError)r�backend�dnsrrr
�get_backends	
r)rcCs�y<tr
t�ddl}y|��S|jk
r8td��YnXWnFtk
r�ddl}y|��dStk
r|td��YnXYnXdS)z�Attempt to determine the in-use asynchronous I/O library by using
    the ``sniffio`` module if it is available.

    Returns the name of the library, or raises AsyncLibraryNotFoundError
    if the library cannot be determined.
    rNz&sniffio cannot determine async libraryrzno async library detected)�_no_sniffio�ImportError�sniffioZcurrent_async_libraryrrZget_running_loop�RuntimeError)rrrrr
�sniff<s rcCstrtStt��S)z6Get the default backend, initializing it if necessary.)�_default_backend�set_default_backendrrrrr
�get_default_backendYsrcCst|�atS)a,Set the default backend.

    It's not normally necessary to call this method, as
    ``get_default_backend()`` will initialize the backend
    appropriately in many cases.  If ``sniffio`` is not installed, or
    in testing situations, this function allows the backend to be set
    explicitly.
    )rr)rrrr
ras
r)�typingrZ
dns.exceptionrZdns._asyncbackendrrrrrr�str�__annotations__r�	exceptionZDNSExceptionrrrrrrrrr
�<module>s