class documentation

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

Method __init__ Create a GAIResolver.
Method resolveHostName See IHostnameResolver.resolveHostName
Instance Variable _getaddrinfo Undocumented
Instance Variable _getThreadPool Undocumented
Instance Variable _reactor Undocumented
def __init__(self, reactor: IReactorThreads, getThreadPool: Optional[Callable[[], ThreadPool]] = None, getaddrinfo: Callable[[str, int, int, int], _GETADDRINFO_RESULT] = getaddrinfo): (source)

Create a GAIResolver.

Parameters
reactor:IReactorThreadsthe reactor to schedule result-delivery on
getThreadPool:0-argument callable returning a twisted.python.threadpool.ThreadPoola function to retrieve the thread pool to use for scheduling name resolutions. If not supplied, the use the given reactor's thread pool.
getaddrinfo:callable with the same signature as getaddrinfoa reference to the getaddrinfo to use - mainly parameterized for testing.
def resolveHostName(self, resolutionReceiver: IResolutionReceiver, hostName: str, portNumber: int = 0, addressTypes: Optional[Sequence[Type[IAddress]]] = None, transportSemantics: str = 'TCP') -> IHostResolution: (source)

See IHostnameResolver.resolveHostName

Parameters
resolutionReceiver:IResolutionReceiversee interface
hostName:strsee interface
portNumber:intsee interface
addressTypes:Optional[Sequence[Type[IAddress]]]see interface
transportSemantics:strsee interface
Returns
IHostResolutionsee interface
_getaddrinfo = (source)

Undocumented

_getThreadPool = (source)

Undocumented

_reactor = (source)

Undocumented