curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. 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 Daniel himself.

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

From: Aleksander Mazur via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 14 Jan 2025 13:02:17 +0100

Dnia 2025-01-14, o godz. 08:07:19
Daniel Stenberg <daniel_at_haxx.se> 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
Received on 2025-01-14