Esempio n. 1
0
def _getaddrinfo_twisted(*args, **kw):
    from twisted.internet.threads import deferToThread
    from eventlib.twistedutil import block_on as _block_on
    return _block_on(deferToThread(__socket.getaddrinfo, *args, **kw))
Esempio n. 2
0
def _getaddrinfo_twisted(*args, **kw):
    from twisted.internet.threads import deferToThread
    from eventlib.twistedutil import block_on as _block_on
    return _block_on(deferToThread(__socket.getaddrinfo, *args, **kw))
Esempio n. 3
0
def _gethostbyname_twisted(name):
    from twisted.internet import reactor
    from eventlib.twistedutil import block_on as _block_on
    return _block_on(reactor.resolve(name))
Esempio n. 4
0
def _gethostbyname_twisted(name):
    from twisted.internet import reactor
    from eventlib.twistedutil import block_on as _block_on
    return _block_on(reactor.resolve(name))