403Webshell
Server IP : 123.56.80.60  /  Your IP : 216.73.216.78
Web Server : Apache/2.4.54 (Win32) OpenSSL/1.1.1s PHP/7.4.33 mod_fcgid/2.3.10-dev
System : Windows NT iZhx3sob14hnz7Z 10.0 build 14393 (Windows Server 2016) i586
User : SYSTEM ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/python/Lib/site-packages/gevent/resolver/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/python/Lib/site-packages/gevent/resolver/blocking.py
# Copyright (c) 2018  gevent contributors. See LICENSE for details.

import _socket

__all__ = [
    'Resolver',
]

class Resolver(object):
    """
    A resolver that directly uses the system's resolver functions.

    .. caution::

        This resolver is *not* cooperative.

    This resolver has the lowest overhead of any resolver and
    typically approaches the speed of the unmodified :mod:`socket`
    functions. However, it is not cooperative, so if name resolution
    blocks, the entire thread and all its greenlets will be blocked.

    This can be useful during debugging, or it may be a good choice if
    your operating system provides a good caching resolver (such as
    macOS's Directory Services) that is usually very fast and
    functionally non-blocking.

    .. versionchanged:: 1.3a2
       This was previously undocumented and existed in :mod:`gevent.socket`.

    """

    def __init__(self, hub=None):
        pass

    def close(self):
        pass

    for method in (
            'gethostbyname',
            'gethostbyname_ex',
            'getaddrinfo',
            'gethostbyaddr',
            'getnameinfo'
    ):
        locals()[method] = staticmethod(getattr(_socket, method))

Youez - 2016 - github.com/yon3zu
LinuXploit