diff options
Diffstat (limited to 'docs/libcurl/curl_easy_duphandle.3')
-rw-r--r-- | docs/libcurl/curl_easy_duphandle.3 | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/libcurl/curl_easy_duphandle.3 b/docs/libcurl/curl_easy_duphandle.3 index 632203978..c39c751f9 100644 --- a/docs/libcurl/curl_easy_duphandle.3 +++ b/docs/libcurl/curl_easy_duphandle.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. +.\" * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -45,6 +45,21 @@ NULL). In multi-threaded programs, this function must be called in a synchronous way, the input handle may not be in use when cloned. +.SH EXAMPLE +.nf +CURL *curl = curl_easy_init(); +CURL *nother; +if(curl) { + CURLcode res; + 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); +} +.fi +.SH AVAILABILITY +Added in libcurl 7.9 .SH RETURN VALUE If this function returns NULL, something went wrong and no valid handle was returned. |