Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`internet`.`interfaces`.`IHostnameResolver``

interface documentation

`class IHostnameResolver(Interface): (source)`

Known implementations: `twisted.internet._resolver.GAIResolver`, `twisted.internet._resolver.SimpleResolverComplexifier`, `twisted.internet.endpoints._SimpleHostnameResolver`

View In Hierarchy

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.

def resolveHostName(resolutionReceiver: `IResolutionReceiver`, hostName: `str`, portNumber: `int` = 0, addressTypes: `Optional[Sequence[Type[IAddress]]]` = None, transportSemantics: `str` = 'TCP') -> `IHostResolution`: (source)

Initiate a hostname resolution.

Parameters
resolutionReceiver:`IResolutionReceiver` | an object that will receive each resolved address as it arrives.
hostName:`str` | The name of the host to resolve. If this contains non-ASCII code points, they will be converted to IDNA first.
portNumber:`int` | The port number that the returned addresses should include.
addressTypes:`Optional[Sequence[Type[IAddress]]]` | An iterable of implementors of `IAddress` that are acceptable values for `resolutionReceiver` to receive to its `addressResolved`. In practice, this means an iterable containing `twisted.internet.address.IPv4Address`, `twisted.internet.address.IPv6Address`, both, or neither.
transportSemantics:`str` | A string describing the semantics of the transport; either `'TCP'` for stream-oriented transports or `'UDP'` for datagram-oriented; see `twisted.internet.address.IPv6Address.type` and `twisted.internet.address.IPv4Address.type`.
Returns
`IHostResolution` | The resolution in progress.