class documentation

DNS protocol over TCP.

Method connectionLost Notify the controller that this protocol is no longer connected.
Method connectionMade Connection is made: reset internal state, and notify the controller.
Method dataReceived Called whenever data is received.
Method query Send out a message with the given queries.
Method writeMessage Send a message holding DNS queries.
Instance Variable buffer Undocumented
Instance Variable length Undocumented
Instance Variable liveMessages Undocumented

Inherited from DNSMixin:

Method __init__ Undocumented
Method callLater Wrapper around reactor.callLater, mainly for test purpose.
Method pickID Return a unique ID for queries.
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.

Inherited from Protocol (via DNSMixin):

Method logPrefix Return a prefix matching the class name, to identify log messages related to this protocol instance.
Class Variable factory Undocumented

Inherited from BaseProtocol (via DNSMixin, Protocol):

Method makeConnection Make a connection to a transport and a server.
Instance Variable connected Undocumented
Instance Variable transport Undocumented
def connectionLost(self, reason): (source)

Notify the controller that this protocol is no longer connected.

def connectionMade(self): (source)

Connection is made: reset internal state, and notify the controller.

def dataReceived(self, data): (source)

Called whenever data is received.

Use this method to translate to a higher-level message. Usually, some callback will be made upon the receipt of each complete protocol message.

Parameters
dataa string of indeterminate length. Please keep in mind that you will probably need to buffer some data, as partial (or multiple) protocol messages may be received! I recommend that unit tests for protocols call through to this method with differing chunk sizes, down to one byte at a time.
def query(self, queries, timeout=60): (source)

Send out a message with the given queries.

Parameters
queries:list of Query instancesThe queries to transmit
timeoutUndocumented
Returns
DeferredUndocumented
def writeMessage(self, message): (source)

Send a message holding DNS queries.

Parameters
message:MessageUndocumented

Undocumented

Undocumented