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: Getting a list of easy handles in a multi handle - possible?

From: Ray Satiro via curl-library <>
Date: Sun, 27 Aug 2023 04:01:55 -0400

On 8/26/2023 2:27 PM, Daniel Stenberg via curl-library wrote:
>> Am I missing something or is this something that could be added?
> Something like this can absolutely be added, and it might even make a
> lot of sense.
> I think I personally would favor an approach that exports the list of
> easy handles, or perhaps just a way for an application to iterate over
> them all, rather than a more simple "close all easy handles the multi
> handle knows". Mostly because providing an iterator opens up for more
> use cases than "just" closing down nicely.
> Thoughts? Any proposals for how such an API would look like?

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;

Received on 2023-08-27