Sortix nightly manual
This manual documents Sortix nightly, a development build that has not been officially released. You can instead view this document in the latest official manual.
curl_easy_duphandle(3) | libcurl | curl_easy_duphandle(3) |
NAME
curl_easy_duphandle - Clone a libcurl session handleDESCRIPTION
This function returns a new curl handle, a duplicate, using all the options 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).EXAMPLE
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
CURL *nother;
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
nother = curl_easy_duphandle(curl);
res = curl_easy_perform(nother);
curl_easy_cleanup(nother);
curl_easy_cleanup(curl);
}
}
AVAILABILITY
Added in 7.9RETURN VALUE
If this function returns NULL, something went wrong and no valid handle was returned.SEE ALSO
curl_easy_cleanup(3), curl_easy_init(3), curl_easy_reset(3), curl_global_init(3)December 4, 2023 | libcurl 8.5.0 |