1CURLSHOPT_USERDATA(3) libcurl Manual CURLSHOPT_USERDATA(3)
2
3
4
6 CURLSHOPT_USERDATA - pointer passed to the lock and unlock mutex call‐
7 backs
8
10 #include <curl/curl.h>
11
12 CURLSHcode curl_share_setopt(CURLSH *share, CURLSHOPT_USERDATA, void *clientp);
13
15 The clientp parameter is held verbatim by libcurl and is passed on as
16 the clientp argument to the callbacks set with CURLSHOPT_LOCKFUNC(3)
17 and CURLSHOPT_UNLOCKFUNC(3).
18
20 All
21
23 CURLSHcode sh;
24 struct secrets private_stuff;
25 share = curl_share_init();
26 sh = curl_share_setopt(share, CURLSHOPT_USERDATA, &private_stuff);
27 if(sh)
28 printf("Error: %s\n", curl_share_strerror(sh));
29
31 Added in 7.10
32
34 CURLSHE_OK (zero) means that the option was set properly, non-zero
35 means an error occurred. See libcurl-errors(3) for the full list with
36 descriptions.
37
39 CURLSHOPT_LOCKFUNC(3), curl_share_setopt(3), curl_share_cleanup(3),
40 curl_share_init(3)
41
42
43
44libcurl 8.0.1 February 07, 2023 CURLSHOPT_USERDATA(3)