Python gevent.socket 模块,getaddrinfo() 实例源码

我们从Python开源项目中,提取了以下5个代码示例,用于说明如何使用gevent.socket.getaddrinfo()

项目:gipc    作者:jgehrcke    | 项目源码 | 文件源码
def test_getaddrinfo_mp(self):
        """This test would make gevent's hub threadpool kill upon hub
        destruction in child block forever. Gipc resolves this by killing
        threadpool even harder.
        """
        import gevent.socket as socket
        socket.getaddrinfo("localhost", 21)
        p = start_process(target=complchild_test_getaddrinfo_mp)
        p.join(timeout=1)
        assert p.exitcode == 0
项目:Intranet-Penetration    作者:yuxiaokui    | 项目源码 | 文件源码
def patch_dns():
    from gevent.socket import gethostbyname, getaddrinfo
    _socket = __import__('socket')
    _socket.getaddrinfo = getaddrinfo
    _socket.gethostbyname = gethostbyname
项目:MKFQ    作者:maojingios    | 项目源码 | 文件源码
def patch_dns():
    from gevent.socket import gethostbyname, getaddrinfo
    _socket = __import__('socket')
    _socket.getaddrinfo = getaddrinfo
    _socket.gethostbyname = gethostbyname
项目:xxNet    作者:drzorm    | 项目源码 | 文件源码
def patch_dns():
    from gevent.socket import gethostbyname, getaddrinfo
    _socket = __import__('socket')
    _socket.getaddrinfo = getaddrinfo
    _socket.gethostbyname = gethostbyname
项目:Docker-XX-Net    作者:kuanghy    | 项目源码 | 文件源码
def patch_dns():
    from gevent.socket import gethostbyname, getaddrinfo
    _socket = __import__('socket')
    _socket.getaddrinfo = getaddrinfo
    _socket.gethostbyname = gethostbyname