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: Reseting a curl multi handle for reuse

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 21 Aug 2023 13:32:52 +0200 (CEST)

On Mon, 21 Aug 2023, Taw via curl-library wrote:

> I want to use a multi handle for async connection.Not sure if the code
> belowis correct, because I don't see any curl_multi_reset in the
> documentation and I don't know how to reset it.

There is no curl_multi_reset(). I have never seen anyone wanting one or having
had a good reason for it.

What would you like the reset to do? Just restore all setopts to their default
values?

> What happens to the curlMulti if I don't reset it between calls, especially
> in case of errors? 

Nothing. There's no persistent error state stored in the handle. An
application could very well spend forever just using the same multi handle,
adding and removing easy handles over time.

-- 
  / 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-21