Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Utilities / cmcurl-7.19.0 / docs / libcurl / curl_share_setopt.3
blob6479917a5cf44689be6b11dd2f756691fb2dfedd
1 .\" $Id: curl_share_setopt.3,v 1.1.1.1 2008-09-23 16:32:05 hoffman Exp $
2 .\"
3 .TH curl_share_setopt 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual"
4 .SH NAME
5 curl_share_setopt - Set options for a shared object
6 .SH SYNOPSIS
7 .B #include <curl/curl.h>
8 .sp
9 CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
10 .ad
11 .SH DESCRIPTION
12 Set the \fIoption\fP to \fIparameter\fP for the given \fIshare\fP.
13 .SH OPTIONS
14 .IP CURLSHOPT_LOCKFUNC
15 The \fIparameter\fP must be a pointer to a function matching the following
16 prototype:
18 void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access,
19 void *userptr);
21 \fIdata\fP defines what data libcurl wants to lock, and you must make sure that
22 only one lock is given at any time for each kind of data.
24 \fIaccess\fP defines what access type libcurl wants, shared or single.
26 \fIuserptr\fP is the pointer you set with \fICURLSHOPT_USERDATA\fP.
27 .IP CURLSHOPT_UNLOCKFUNC
28 The \fIparameter\fP must be a pointer to a function matching the following
29 prototype:
31 void unlock_function(CURL *handle, curl_lock_data data, void *userptr);
33 \fIdata\fP defines what data libcurl wants to unlock, and you must make sure
34 that only one lick is given at any time for each kind of data.
36 \fIuserptr\fP is the pointer you set with \fICURLSHOPT_USERDATA\fP.
37 .IP CURLSHOPT_SHARE
38 The \fIparameter\fP specifies a type of data that should be shared. This may
39 be set to one of the values described below.
40 .RS
41 .IP CURL_LOCK_DATA_COOKIE
42 Cookie data will be shared across the easy handles using this shared object.
43 .IP CURL_LOCK_DATA_DNS
44 Cached DNS hosts will be shared across the easy handles using this shared
45 object. Note that when you use the multi interface, all easy handles added to
46 the same multi handle will share DNS cache by default without this having to
47 be used!
48 .RE
49 .IP CURLSHOPT_UNSHARE
50 This option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies that
51 the specified \fIparameter\fP will no longer be shared. Valid values are 
52 the same as those for \fICURLSHOPT_SHARE\fP.
53 .IP CURLSHOPT_USERDATA
54 The \fIparameter\fP allows you to specify a pointer to data that will passed
55 to the lock_function and unlock_function each time it is called.
56 .SH RETURN VALUE
57 CURLSHE_OK (zero) means that the option was set properly, non-zero means an
58 error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors.3\fP
59 man page for the full list with descriptions.
60 .SH "SEE ALSO"
61 .BR curl_share_cleanup "(3), " curl_share_init "(3)"