Subject: channel usage

channel usage

From: Rajmohan Banavi <rajmohanbanavi_at_gmail.com>
Date: Fri, 31 May 2019 19:57:19 +0530

Started exploring c-ares library api and have following questions

   1. Once the application creates a channel using *ares_init_options()*,
   can this same channel be used to fire off multiple concurrent lookups using
   *ares_gethostbyname()*?
   2. Suppose the application has an infinite loop, during which it creates
   a channel and does multiple lookups. But does not destroy the channel
   because the intent is to use the channel again sometime later. Then it is
   observed that the callback is called continuously for the previous lookup.
   Is this behaviour intentional? In this case how can the application make
   use of the same channel because the intent is to use the ARES_FLAG_STAYOPEN
   flag and keep the connection alive.

Thanks in advance.
Received on 2019-05-31