1curl_easy_duphandle(3) libcurl Manual curl_easy_duphandle(3)
2
3
4
6 curl_easy_duphandle - Clone a libcurl session handle
7
9 #include <curl/curl.h>
10
11 CURL *curl_easy_duphandle(CURL *handle);
12
13
15 This function will return a new curl handle, a duplicate, using all the
16 options previously set in the input curl handle. Both handles can sub‐
17 sequently be used independently and they must both be freed with
18 curl_easy_cleanup(3).
19
20 All strings that the input handle has been told to point to (as opposed
21 to copy) with previous calls to curl_easy_setopt(3) using char *
22 inputs, will be pointed to by the new handle as well. You must there‐
23 fore make sure to keep the data around until both handles have been
24 cleaned up.
25
26 The new handle will not inherit any state information, no connections,
27 no SSL sessions and no cookies. It also will not inherit any share
28 object states or options (it will be made as if CURLOPT_SHARE(3) was
29 set to NULL).
30
31 In multi-threaded programs, this function must be called in a synchro‐
32 nous way, the input handle may not be in use when cloned.
33
35 If this function returns NULL, something went wrong and no valid handle
36 was returned.
37
39 curl_easy_init(3),curl_easy_cleanup(3),curl_easy_reset(3),
40 curl_global_init(3)
41
42
43
44libcurl 7.69.1 March 01, 2019 curl_easy_duphandle(3)