1curl_share_setopt(3)            libcurl Manual            curl_share_setopt(3)
2
3
4

NAME

6       curl_share_setopt - Set options for a shared object
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
12

DESCRIPTION

14       Set the option to parameter for the given share.
15

OPTIONS

17       CURLSHOPT_LOCKFUNC
18              See CURLSHOPT_LOCKFUNC(3).
19
20       CURLSHOPT_UNLOCKFUNC
21              See CURLSHOPT_UNLOCKFUNC(3).
22
23       CURLSHOPT_SHARE
24              See CURLSHOPT_SHARE(3).
25
26       CURLSHOPT_UNSHARE
27              See CURLSHOPT_UNSHARE(3).
28
29       CURLSHOPT_USERDATA
30              See CURLSHOPT_USERDATA(3).
31

EXAMPLE

33         CURLSHcode sh;
34         share = curl_share_init();
35         sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
36         if(sh)
37           printf("Error: %s\n", curl_share_strerror(sh));
38

AVAILABILITY

40       Added in 7.10
41

RETURN VALUE

43       CURLSHE_OK  (zero)  means  that  the  option was set properly, non-zero
44       means an error occurred as <curl/curl.h> defines. See  the  libcurl-er‐
45       rors.3 man page for the full list with descriptions.
46

SEE ALSO

48       curl_share_cleanup(3), curl_share_init(3)
49
50
51
52libcurl 7.85.0                   May 17, 2022             curl_share_setopt(3)
Impressum