diff options
Diffstat (limited to 'docs/libcurl/curl_share_init.3')
-rw-r--r-- | docs/libcurl/curl_share_init.3 | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/docs/libcurl/curl_share_init.3 b/docs/libcurl/curl_share_init.3 index 69ecc9da1..3c8844e5e 100644 --- a/docs/libcurl/curl_share_init.3 +++ b/docs/libcurl/curl_share_init.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 @@ -36,6 +36,16 @@ documentation. This init call MUST have a corresponding call to This \fIshare handle\fP is what you pass to curl using the \fICURLOPT_SHARE(3)\fP option with \fIcurl_easy_setopt(3)\fP, to make that specific curl handle use the data in this share. +.SH EXAMPLE +.nf + CURLSHcode sh + share = curl_share_init(); + sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT); + if(sh) + printf("Error: %s\n", curl_share_strerror(sh)); +.fi +.SH AVAILABILITY +Added in libcurl 7.10 .SH RETURN VALUE If this function returns NULL, something went wrong (out of memory, etc.) and therefore the share object was not created. |