curl / Mailing Lists / curl-library / Single Mail

curl-library

a couple of questions re CURLOPT_RESOLVE

From: Vadim Grinshpun <vgrinshp_at_akamai.com>
Date: Fri, 30 Dec 2016 10:23:28 -0500

Hi,

I'm looking to make use of CURLOPT_RESOLVE, and would like to get a
couple clarifications on its semantics.

The basic question is this: is the list that the application provides as
the argument to CURLOPT_RESOLVE
treated as incremental updates to an internal DNS cache, or is it
effectively the cache itself?

Or, more specifically:

1: what is the expected lifetime of the list? Can it be freed
immediately after the curl_easy_setopt(h, CURLOPT_RESOLVE,list) call
completes?
(The example seems to imply that the list needs to persist while a
handle is using it; however this is not explicitly stated anywhere I
could find).

2. If the list must persist after the setopt call: how should updates be
handled? E.g.:
  - providing a new list to curl
  - updating the existing list, still having to call ...setopt()
  - updating the existing list, expecting curl to just pick up the
change next time it resolves

Thanks in advance!
-Vadim

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-12-30