1 .\" You can view this file with:
3 .\" $Id: curl_easy_duphandle.3,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
5 .TH curl_easy_duphandle 3 "18 September 2001" "libcurl 7.9" "libcurl Manual"
7 curl_easy_duphandle - Clone a libcurl session handle
9 .B #include <curl/curl.h>
11 .BI "CURL *curl_easy_duphandle(CURL *"handle ");"
14 This function will return a new curl handle, a duplicate, using all the
15 options previously set in the input curl \fIhandle\fP. Both handles can
16 subsequently be used independently and they must both be freed with
17 \fIcurl_easy_cleanup(3)\fP.
19 All strings that the input handle has been told to point to (as opposed to
20 copy) with previous calls to \fIcurl_easy_setopt(3)\fP using char * inputs,
21 will be pointed to by the new handle as well. You must therefore make sure to
22 keep the data around until both handles have been cleaned up.
24 The new handle will \fBnot\fP inherit any state information, no connections,
25 no SSL sessions and no cookies.
27 \fBNote\fP that even in multi-threaded programs, this function must be called
28 in a synchronous way, the input handle may not be in use when cloned.
30 If this function returns NULL, something went wrong and no valid handle was
33 .BR curl_easy_init "(3)," curl_easy_cleanup "(3)," curl_global_init "(3)