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: Getting a list of easy handles in a multi handle - possible?
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 27 Aug 2023 11:30:57 +0200 (CEST)
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.
Date: Sun, 27 Aug 2023 11:30:57 +0200 (CEST)
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.htmlReceived on 2023-08-27