Re: How to properly re-use an easy handle having CURLOPT_CONNECT_ONLY=1?

Aleksander Mazur via curl-library <[email protected]>
Newsgroups gmane.comp.web.curl.library
Message-ID <20250114130217.2a0e0ea4@mocarz>
Dnia 2025-01-14, o godz. 08:07:19
Daniel Stenberg <[email protected]> napisał(a):

> As documented in the CURLOPT_CONNECT_ONLY man page which seems relevant since 
> your example code uses it:
> 
>    Transfers marked connect only do not reuse any existing connections and
>    connections marked connect only are not allowed to get reused.
> 

Thanks for pointing this out.

I apparently misunderstood this paragraph as a hint of how libcurl works
internally (that it simply won't reuse the underlying connection) rather than
"application MUST NOT pass such easy handle to curl_easy_perform again".

So let's say I call curl_easy_cleanup + curl_easy_init before each
reconnection. Will libcurl reuse old TLS context and resolver cache?

-- 
Aleksander Mazur
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.