gnurl_easy_duphandle(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸŽ€ gnurl_easy_duphandle(3) πŸŽ€

okay bestie, welcome to the libgnurl Manual page for gnurl_easy_duphandle(3) β€” yes, the actual function name inside is curl_easy_duphandle, iykyk, and we are keeping every name exactly as it is. πŸ’–


✨ NAME ✨

  • curl_easy_duphandle β€” clone a libcurl session handle πŸ’…

🌸 SYNOPSIS 🌸

#include <gnurl/curl.h>

CURL *curl_easy_duphandle(CURL *handle);

πŸ’– DESCRIPTION πŸ’–

okay so this function will return a new curl handle β€” a duplicate β€” and it’s using all the options that were previously set in the input curl handle. Both handles can subsequently be used independently, and they must both be freed with curl_easy_cleanup(3). periodt. 🫢

now the important string tea: all the strings that the input handle has been told to point to β€” as opposed to copy β€” with previous calls to curl_easy_setopt(3) using char * inputs will also be pointed to by the new handle. so you must therefore make sure to keep that data around until both handles have been cleaned up. no cap. 🫢✨

the new handle will not inherit any state information, no connections, no SSL sessions, and no cookies. it also will not inherit any share object states or options β€” it will be made as if CURLOPT_SHARE(3) was set to NULL. πŸ’€

in multi-threaded programs, this function must be called in a synchronous way. the input handle may not be in use when it’s cloned. periodt. πŸ’…

πŸ¦‹ RETURN VALUE πŸ¦‹

if this function returns NULL, something went wrong and no valid handle was returned. that’s the whole vibe check. 😭

🌈 SEE ALSO 🌈


kisses bestie, this page is part of the libgnurl Manual, source/version libcurl, dated 19 Sep 2014 β€” gnurl_easy_duphandle(3) out. πŸ’…βœ¨

πŸ“¦ where this page comes from