dns_cache_submit2 — Submit a query to the dns cache
void **dns_cache_submit2** ( | query, | |
| | callback, | |
| | closure, | |
| | flags
); | |
Submit a query to the dns cache.
When the query completes, the completion callback will be called. If flags is set to DNS_CACHE_DISPATCH_NOW, and if called from the scheduler thread, then the query will be queued immediately and may call the completion routine before the call to dns_cache_submit2 returns.
This can make it difficult to write asynchronous code, as things may appear to complete before they have finished starting.
The dns cache query. A pointer to a dns_cache_query struct. For documentation of this data structure see “dns_cache_query”
The dns cache callback. A pointer to function.
typedef void (*dns_cache_callback)(dns_cache_cachenode *, void *closure);
For documentation of a dns_cache_cachenode structure see “dns_cache_cachenode”.
A pointer to void.
Integer parameter. Typically either 0 or DNS_CACHE_DISPATCH_NOW.
This function returns void.
It is only legal to call this function in the