]> icculus.org git repositories - icculus/iodoom3.git/blob - neo/curl/docs/libcurl/curl_share_setopt.3
hello world
[icculus/iodoom3.git] / neo / curl / docs / libcurl / curl_share_setopt.3
1 .\" $Id: curl_share_setopt.3,v 1.3 2004/02/25 12:34:19 bagder 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:
17
18 void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access,
19 void *userptr);
20
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.
23
24 \fIaccess\fP defines what access type libcurl wants, shared or single.
25
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:
30
31 void unlock_function(CURL *handle, curl_lock_data data, void *userptr);
32
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.
35
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.
46 .RE
47 .IP CURLSHOPT_UNSHARE
48 This option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies that
49 the specified \fIparameter\fP will no longer be shared. Valid values are 
50 the same as those for \fICURLSHOPT_SHARE\fP.
51 .IP CURLSHOPT_USERDATA
52 The \fIparameter\fP allows you to specify a pointer to data that will passed
53 to the lock_function and unlock_function each time it is called.
54 .SH RETURN VALUE
55 CURLSHE_OK (zero) means that the option was set properly, non-zero means an
56 error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors.3\fP
57 man page for the full list with descriptions.
58 .SH "SEE ALSO"
59 .BR curl_share_cleanup "(3), " curl_share_init "(3)"