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: Patrick Monnerat via curl-library <curl-library_at_lists.haxx.se>
Date: Sun, 27 Aug 2023 20:35:14 +0200
On 8/27/23 18:01, Daniel Stenberg via curl-library wrote:
> On Sun, 27 Aug 2023, Henrik Holst via curl-library wrote:
>
>> CURL **handles = curl_multi_get_handles(multi);
>>
>> where the last position in *handles would be NULL to indicate the
>> end? Yes it would require libcurl to allocate a list and populate it
>> at the call, but the allocation had to be done in this case anyway
>> and returning a complete list at once avoids the problem with
>> adds/dels during iteration of the list.
>
> A benefit with this API design is that it can be freed with the
> already existing curl_free() function.
+1
IMO the best proposal yet :-) I don't see any drawback.
Date: Sun, 27 Aug 2023 20:35:14 +0200
On 8/27/23 18:01, Daniel Stenberg via curl-library wrote:
> On Sun, 27 Aug 2023, Henrik Holst via curl-library wrote:
>
>> CURL **handles = curl_multi_get_handles(multi);
>>
>> where the last position in *handles would be NULL to indicate the
>> end? Yes it would require libcurl to allocate a list and populate it
>> at the call, but the allocation had to be done in this case anyway
>> and returning a complete list at once avoids the problem with
>> adds/dels during iteration of the list.
>
> A benefit with this API design is that it can be freed with the
> already existing curl_free() function.
+1
IMO the best proposal yet :-) I don't see any drawback.
-- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2023-08-27