class documentation

class twisted.names.dns.DNSMixin: (source)

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

View In Hierarchy

DNS protocol mixin shared by UDP and TCP implementations.

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

Undocumented

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

Undocumented

controller = (source)

Undocumented

def pickID(self): (source)

Return a unique ID for queries.

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

Wrapper around reactor.callLater, mainly for test purpose.

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

Send out a message with the given queries.

ParametersqueriesThe queries to transmit (type: list of Query instances)
timeoutHow long to wait before giving up (type: int or float)
idUnique key for this request (type: int)
writeMessageOne-parameter callback which writes the message (type: callable)
Returnsa 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, ...). (type: Deferred)
def _clearFailed(self, deferred, id): (source)

Clean the Deferred after a timeout.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.