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: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 26 Aug 2023 20:27:38 +0200 (CEST)

On Sat, 26 Aug 2023, Richard W.M. Jones via curl-library wrote:

> It seems like the multi "knows" what easy handles it contains already
> (multi->easyp), so we shouldn't have to maintain this list ourselves.
> However I couldn't see anything in the API to access this.

That is correct. The list is not accessible from the outside.

I am open to the idea of adding a function to export this knowledge.

> Alternatively, could there be an operation which frees up the multi handle
> and any also frees the easy handles that it contains? (curl_multi_cleanup
> removes the easy handles from the multi, but doesn't free them.)

...

> 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?

-- 
  / 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
Received on 2023-08-26