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