class documentation
class _SimpleHostnameResolver: (source)
Constructor: _SimpleHostnameResolver(nameResolution)
Implements interfaces: twisted.internet.interfaces.IHostnameResolver
An IHostnameResolver
provider that invokes a provided callable to resolve hostnames.
Method | __init__ |
Create a _SimpleHostnameResolver instance. |
Method | resolve |
Initiate a hostname resolution. |
Class Variable | _log |
Undocumented |
Instance Variable | _name |
the callable resolveHostName invokes to resolve hostnames. |
def resolveHostName(self, resolutionReceiver:
IResolutionReceiver
, hostName: str
, portNumber: int
= 0, addressTypes: Optional[ Sequence[ Type[ IAddress]]]
= None, transportSemantics: str
= 'TCP') -> IHostResolution
:
(source)
¶
Initiate a hostname resolution.
Parameters | |
resolutionIResolutionReceiver | an object that will receive each resolved address as it arrives. |
hoststr | see interface |
portint | see interface |
addressOptional[ | Ignored in this implementation. |
transportstr | Ignored in this implementation. |
Returns | |
IResolutionReceiver | The resolution in progress. |
_nameResolution: A
callable
that accepts two arguments: the host to resolve and the port number to include in the result. =
(source)
¶
the callable resolveHostName
invokes to resolve hostnames.