Inheritance diagram for pos_srvresolver:
Public Member Functions |
|
void | query (DnsMessage *q, DnsMessage *&a, _addr *server, int flags=Q_DFL) |
high-level query function |
|
void | query (DnsMessage *q, DnsMessage *&a, stl_slist(_addr)&servers, int flags=Q_DFL) |
high-level query function using multiple servers |
|
void | sendmessage (DnsMessage *msg, _addr *res, int sockid=-1) |
low-level resolver function for sending a message |
|
bool | waitanswer (DnsMessage *&ans, stl_slist(WaitAnswerData)&wait, int timeout, stl_slist(WaitAnswerData)::iterator &it, int sockid=-1) |
low-level resolver function for waiting for an answer |
This is the resolver implementation for Posadis server applications. It sends all UDP queries through the same socket, thus saving valuable resources. This does mean though that the Posadis server thread should be running before any pos_srvresolver function is used.
The TCP client implementation of pos_srvresolver is the same as that of the client resolver.
Definition at line 52 of file srvresolver.h.
|
high-level query function using multiple servers This function generally behaves the same as the query() function, except it takes a list of servers instead of one. The query algorithm differs in that for each timeout value from udp_tries, all servers will be queried. Also, if the answer is truncated, _only_ the server that returned the truncated answer will be tried using TCP. This function will start querying at a random place in the servers list; after that, it will run through all servers listed in the order in which you specify them.
Reimplemented from pos_resolver. |
|
high-level query function This function will query the given DNS server for the information identified by the DNS query message q. If it succeeds, it will return and put the answer from the server in a, which need not be initialized previously (in fact, this will result in a memory leak). If not, it will raise a PException. If the query() function does not receive an answer in time, it will retry for n_udp_tries times, using the timeout values from the udp_tries array. If the answer it receives is truncated, it will retry using TCP, unless instructed not to by the flags parameter. The behavior of the query function can be changed by the flags parameter. Currently, this can only be Q_DFL (default flags) or Q_NOTCP (do not retry using UDP).
Reimplemented from pos_resolver. |
|
low-level resolver function for sending a message This function sends a DNS message to a specified server using UDP.
Reimplemented from pos_resolver. |
|
low-level resolver function for waiting for an answer This function waits for at most the amount of milliseconds specified by timeout until an answer to our query arrives. Since multiple messages for the same query might have been sent out, it asks for a list of sent queries. If no answer is received in time, this function will raise an exception.
Reimplemented from pos_resolver. |