GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
ARES_QUEUE(3) FreeBSD Library Functions Manual ARES_QUEUE(3)

ares_queue_wait_empty, ares_queue_active_queries - Functions for checking the c-ares queue status

#include <ares.h>
size_t ares_queue_active_queries(const ares_channel_t *channel);
ares_status_t ares_queue_wait_empty(ares_channel_t *channel,

int timeout_ms);

The ares_queue_active_queries(3) function retrieves the total number of active queries pending answers from servers. Some c-ares requests may spawn multiple queries, such as ares_getaddrinfo(3) when using AF_UNSPEC, which will be reflected in this number. The channel parameter must be set to an initialized channel.

The ares_queue_wait_empty(3) function blocks until notified that there are no longer any queries in queue, or the specified timeout has expired. The channel parameter must be set to an initialized channel. The timeout_ms parameter is the number of milliseconds to wait for the queue to be empty or -1 for Infinite.

ares_queue_active_queries(3) returns the active query count.

ares_queue_wait_empty(3) can return any of the following values:

if not built with threading support
if requested timeout expired
when queue is empty.

This function was first introduced in c-ares version 1.27.0, and requires the c-ares library to be built with threading support.

ares_init_options(3), ares_threadsafety(3)

16 February 2024

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.