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`.`names`.`dns`.`DNSMixin``

class documentation

`class DNSMixin: (source)`

Known subclasses: `twisted.names.dns.DNSDatagramProtocol`, `twisted.names.dns.DNSProtocol`

View In Hierarchy

DNS protocol mixin shared by UDP and TCP implementations.

Method | `__init__` | Undocumented
Method | `callLater` | Wrapper around reactor.callLater, mainly for test purpose.
Method | `pickID` | Return a unique ID for queries.
Class Variable | `liveMessages` | Undocumented
Instance Variable | `controller` | Undocumented
Instance Variable | `id` | Undocumented
Method | `_clearFailed` | Clean the Deferred after a timeout.
Method | `_query` | Send out a message with the given queries.
Instance Variable | `_reactor` | A `IReactorTime` and `IReactorUDP` provider which will be used to issue DNS queries and manage request timeouts.

def __init__(self, controller, reactor=None): (source)

Undocumented

def callLater(self, period, func, *args): (source)

Wrapper around reactor.callLater, mainly for test purpose.

def pickID(self): (source)

Return a unique ID for queries.

liveMessages = (source)
overridden in `twisted.names.dns.DNSDatagramProtocol`, `twisted.names.dns.DNSProtocol`

Undocumented

controller = (source)

Undocumented

id = (source)

Undocumented

def _clearFailed(self, deferred, id): (source)

Clean the Deferred after a timeout.

def _query(self, queries, timeout, id, writeMessage): (source)

Send out a message with the given queries.

Parameters
queries:`list` of `Query` instances | The queries to transmit
timeout:`int` or `float` | How long to wait before giving up
id:`int` | Unique key for this request
writeMessage:`callable` | One-parameter callback which writes the message
Returns
`Deferred` | a `Deferred` which will be fired with the result of the query, or errbacked with any errors that could happen (exceptions during writing of the query, timeout errors, ...).

_reactor = (source)

A `IReactorTime` and `IReactorUDP` provider which will be used to issue DNS queries and manage request timeouts.