Inherits object.
List of all members.
Detailed Description
Simplified (no search paths) asynchronous adaptation of
dns.resolver.Resolver.query() (q.v.).
Definition at line 116 of file adns.py.
Member Function Documentation
def rpki.adns.query.__init__ |
( |
|
self, |
|
|
|
cb, |
|
|
|
eb, |
|
|
|
qname, |
|
|
|
qtype = dns.rdatatype.A , |
|
|
|
qclass = dns.rdataclass.IN | |
|
) |
| | |
def rpki.adns.query.cleanup |
( |
|
self |
) |
|
Shut down our timer and sockets.
Definition at line 258 of file adns.py.
def rpki.adns.query.done1 |
( |
|
self |
) |
|
Done with outer loop. If we got a useful answer, cache it, then
pass it back to caller; if we got an error, pass the appropriate
exception back to caller.
Definition at line 273 of file adns.py.
def rpki.adns.query.done2 |
( |
|
self |
) |
|
Done with inner loop. If we still haven't got an answer and
haven't (yet?) eliminated all of our nameservers, wait a little
while before starting the cycle again, unless we've hit the
timeout threshold for the whole query.
Definition at line 239 of file adns.py.
def rpki.adns.query.go |
( |
|
self |
) |
|
Start running the query. Check our cache before doing network
query; if we find an answer there, just return it. Otherwise
start the network query.
Definition at line 138 of file adns.py.
def rpki.adns.query.loop1 |
( |
|
self |
) |
|
Outer loop. If we haven't got a response yet and still have
nameservers to check, start inner loop. Otherwise, we're done.
Definition at line 162 of file adns.py.
def rpki.adns.query.loop2 |
( |
|
self, |
|
|
|
iterator, |
|
|
|
nameserver | |
|
) |
| | |
Inner loop. Send query to next nameserver in our list, unless
we've hit the overall timeout for this query.
Definition at line 173 of file adns.py.
def rpki.adns.query.lose |
( |
|
self, |
|
|
|
e | |
|
) |
| | |
Something bad happened. Clean up, then pass error back to caller.
Definition at line 266 of file adns.py.
def rpki.adns.query.socket_cb |
( |
|
self, |
|
|
|
af, |
|
|
|
from_host, |
|
|
|
from_port, |
|
|
|
wire | |
|
) |
| | |
Received a packet that might be a DNS message. If it doesn't look
like it came from one of our nameservers, just drop it and leave
the timer running. Otherwise, try parsing it: if it's an answer,
we're done, otherwise handle error appropriately and move on to
next nameserver.
Definition at line 213 of file adns.py.
def rpki.adns.query.socket_eb |
( |
|
self, |
|
|
|
e | |
|
) |
| | |
UDP socket signaled error. If it really is some kind of socket
error, handle as if we've timed out on this nameserver; otherwise,
pass error back to caller.
Definition at line 200 of file adns.py.
def rpki.adns.query.socket_timeout |
( |
|
self |
) |
|
No answer from nameserver, move on to next one (inner loop).
Definition at line 193 of file adns.py.
Member Data Documentation
The documentation for this class was generated from the following file: