Implements interfaces: twisted.internet.interfaces.IHostnameResolver

IHostnameResolver implementation that resolves hostnames by calling getaddrinfo in a thread.

Method __init__ Create a GAIResolver.
Method resolveHostName See IHostnameResolver.resolveHostName
def __init__(self, reactor, getThreadPool=None, getaddrinfo=getaddrinfo): (source)

Create a GAIResolver.

Parametersreactorthe reactor to schedule result-delivery on (type: IReactorThreads)
getThreadPoola function to retrieve the thread pool to use for scheduling name resolutions. If not supplied, the use the given reactor's thread pool. (type: 0-argument callable returning a twisted.python.threadpool.ThreadPool)
getaddrinfoa reference to the getaddrinfo to use - mainly parameterized for testing. (type: callable with the same signature as getaddrinfo)
def resolveHostName(self, resolutionReceiver, hostName, portNumber=0, addressTypes=None, transportSemantics='TCP'): (source)

See IHostnameResolver.resolveHostName

ParametersresolutionReceiversee interface
hostNamesee interface
portNumbersee interface
addressTypessee interface
transportSemanticssee interface
Returnssee interface
API Documentation for Twisted, generated by pydoctor at 2018-04-29 21:01:12.