Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
curl_easy_duphandle(3) | Library Functions Manual | curl_easy_duphandle(3) |
NAME
curl_easy_duphandle - clone an easy 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).PROTOCOLS
This functionality affects all supported protocolsEXAMPLE
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 curl 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)2024-11-23 | libcurl |