twisted.internet.interfaces.IHostnameResolver(Interface) interface documentationtwisted.internet.interfaces
(View In Hierarchy)
Known implementations: twisted.internet._resolver.GAIResolver, twisted.internet._resolver.SimpleResolverComplexifier, twisted.internet.endpoints._SimpleHostnameResolver
An IHostnameResolver
can resolve a host name and port number into a series of IAddress 
objects.
| Present Since | Twisted 17.1.0 | |
| Method | resolveHostName | Initiate a hostname resolution. | 
Initiate a hostname resolution.
| Parameters | resolutionReceiver | an object that will receive each resolved address as it arrives. (type: IResolutionReceiver) | 
| hostName | The name of the host to resolve.  If this contains non-ASCII code points, 
they will be converted to IDNA first. (type: unicode) | |
| portNumber | The port number that the returned addresses should include. (type: intgreater than or equal to 0 and less than 65536) | |
| addressTypes | An iterable of implementors of IAddressthat are acceptable values forresolutionReceiverto receive 
to itsaddressResolved.
In practice, this means an iterable containingtwisted.internet.address.IPv4Address,twisted.internet.address.IPv6Address,
both, or neither. (type:collections.abc.Iterableoftype) | |
| transportSemantics | A string describing the semantics of the transport; either 'TCP'for stream-oriented transports or'UDP'for
datagram-oriented; seetwisted.internet.address.IPv6Address.typeandtwisted.internet.address.IPv4Address.type. (type: nativestr) | |
| Returns | The resolution in progress. (type: IResolutionReceiver) | |