curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

RE: [EXTERNAL] Re: Feature request: provide ability to set a global callback function telling libcurl if IPv6 works on the system

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 29 Sep 2022 09:08:54 +0200 (CEST)

On Tue, 27 Sep 2022, Dmitry Karpov wrote:

> So, for tuning just a few "system" settings, I am thinking that maybe we can
> have something like:
>
> curl_global_init_system(long flags, curl_system_funcs *system_funcs);

I still don't like the idea of having a "global" system level. We can easily
think of a system where you run stuff multi-threaded, and then you might want
one "system" for each thread's app level.

I also like the thought that this would have to be explicit and not implicit:
meaning that the app would have to agree to and opt-in being overrided by a
(specific) system level. Possibly by a CURLOPT_SYSTEM=[system handle] option,
possibly by having a new curl_easy_init() version that takes the [system
handle] as an argument.

> struct curl_system_funcs {
> curl_ipv6works ipv6_works; // Function checking if IPv6 works on the system

If we would do this with callbacks, then maybe there should be a system
callback for any option the app sets. To allow the system to filter or alter
what is actually set in the app handle.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2022-09-29