On Sun, 27 Aug 2023, Ray Satiro via curl-library wrote:

How about just return a multi maintained linked list of non-internal easy handles?

curl_easy_handles_list *list = curl_multi_get_handles(multi);

struct curl_easy_handle_list {
  CURL *easy;
  struct curl_easy_handle_list *next;
};

It could certainly work. I don't like how the list will be populated by more and more "dead" pointers as the application iterates over it and removes and cleans up the easy handles, but that's not a very technical objection.

If we do that function, we probably need to provide a companion function that frees that struct again?

Or we could allocate it and keep a reference to that data in the multi handle itself but then repeated calls to the funtion would remove the previous data and I am not sure applications like that kind of behavior.

--

 / 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/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to