class documentation
class NoResponseDNSServerFactory(server.DNSServerFactory): (source)
A server.DNSServerFactory
subclass which does not attempt to reply to any received messages.
Used for testing logged messages in messageReceived without having to fake or patch the preceding code which attempts to deliver a response message.
Method | allow |
Deny all queries. |
Method | send |
A noop send reply. |
Inherited from DNSServerFactory
:
Method | __init__ |
No summary |
Method | build |
Create an instance of a subclass of Protocol. |
Method | connection |
Stop tracking a no-longer connected DNSProtocol . |
Method | connection |
Track a newly connected DNSProtocol . |
Method | got |
A callback used by DNSServerFactory.handleQuery for handling deferred errors from self.resolver.query. |
Method | got |
A callback used by DNSServerFactory.handleQuery for handling the deferred response from self.resolver.query. |
Method | handle |
Called by DNSServerFactory.messageReceived when an inverse query message is received. |
Method | handle |
Called by DNSServerFactory.messageReceived when a notify message is received. |
Method | handle |
Called by DNSServerFactory.messageReceived when a message with unrecognised OPCODE is received. |
Method | handle |
Called by DNSServerFactory.messageReceived when a query message is received. |
Method | handle |
Called by DNSServerFactory.messageReceived when a status message is received. |
Method | message |
DNSServerFactory.messageReceived is called by protocols which are under the control of this DNSServerFactory whenever they receive a DNS query message or an unexpected / duplicate / late DNS response message. |
Instance Variable | cache |
A Cache instance whose cacheResult method is called when a response is received from one of clients. Defaults to None if no caches are specified. See caches of __init__ for more details. |
Instance Variable | can |
A flag indicating whether this server is capable of performing recursive DNS resolution. |
Instance Variable | connections |
A list of all the connected DNSProtocol instances using this object as their controller. |
Instance Variable | protocol |
A callable used for building a DNS stream protocol. Called by DNSServerFactory.buildProtocol and passed the DNSServerFactory instance as the one and only positional argument. Defaults to dns.DNSProtocol ... |
Instance Variable | resolver |
A resolve.ResolverChain containing an ordered list of authorities, caches and clients to which queries will be dispatched. |
Instance Variable | verbose |
See __init__ |
Method | _response |
Generate a Message instance suitable for use as the response to message. |
Method | _verbose |
Log a message only if verbose logging is enabled. |
Instance Variable | _message |
A response message constructor with an initializer signature matching dns.Message.__init__ . |
Inherited from Factory
(via DNSServerFactory
, ServerFactory
):
Class Method | for |
Create a factory for the given protocol. |
Method | do |
Make sure startFactory is called. |
Method | do |
Make sure stopFactory is called. |
Method | log |
Describe this factory for log messages. |
Method | start |
This will be called before I begin listening on a Port or Connector. |
Method | stop |
This will be called before I stop listening on all Ports/Connectors. |
Class Variable | noisy |
Undocumented |
Instance Variable | num |
Undocumented |
Deny all queries.
Parameters | |
message | See server.DNSServerFactory.allowQuery |
protocol | See server.DNSServerFactory.allowQuery |
address | See server.DNSServerFactory.allowQuery |
Returns | |
bool | False |
A noop send reply.
Parameters | |
protocol | See server.DNSServerFactory.sendReply |
message | See server.DNSServerFactory.sendReply |
address | See server.DNSServerFactory.sendReply |