⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 curl_share_setopt.3

📁 THIS IS HTTP CURL Example
💻 3
字号:
.\" $Id: curl_share_setopt.3,v 1.4 2006-07-07 22:07:10 bagder Exp $.\".TH curl_share_setopt 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl Manual".SH NAMEcurl_share_setopt - Set options for a shared object.SH SYNOPSIS.B #include <curl/curl.h>.spCURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);.ad.SH DESCRIPTIONSet the \fIoption\fP to \fIparameter\fP for the given \fIshare\fP..SH OPTIONS.IP CURLSHOPT_LOCKFUNCThe \fIparameter\fP must be a pointer to a function matching the followingprototype:void lock_function(CURL *handle, curl_lock_data data, curl_lock_access access,void *userptr);\fIdata\fP defines what data libcurl wants to lock, and you must make sure thatonly one lock is given at any time for each kind of data.\fIaccess\fP defines what access type libcurl wants, shared or single.\fIuserptr\fP is the pointer you set with \fICURLSHOPT_USERDATA\fP..IP CURLSHOPT_UNLOCKFUNCThe \fIparameter\fP must be a pointer to a function matching the followingprototype:void unlock_function(CURL *handle, curl_lock_data data, void *userptr);\fIdata\fP defines what data libcurl wants to unlock, and you must make surethat only one lick is given at any time for each kind of data.\fIuserptr\fP is the pointer you set with \fICURLSHOPT_USERDATA\fP..IP CURLSHOPT_SHAREThe \fIparameter\fP specifies a type of data that should be shared. This maybe set to one of the values described below..RS.IP CURL_LOCK_DATA_COOKIECookie data will be shared across the easy handles using this shared object..IP CURL_LOCK_DATA_DNSCached DNS hosts will be shared across the easy handles using this sharedobject. Note that when you use the multi interface, all easy handles added tothe same multi handle will share DNS cache by default without this having tobe used!.RE.IP CURLSHOPT_UNSHAREThis option does the opposite of \fICURLSHOPT_SHARE\fP. It specifies thatthe specified \fIparameter\fP will no longer be shared. Valid values are the same as those for \fICURLSHOPT_SHARE\fP..IP CURLSHOPT_USERDATAThe \fIparameter\fP allows you to specify a pointer to data that will passedto the lock_function and unlock_function each time it is called..SH RETURN VALUECURLSHE_OK (zero) means that the option was set properly, non-zero means anerror occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors.3\fPman page for the full list with descriptions..SH "SEE ALSO".BR curl_share_cleanup "(3), " curl_share_init "(3)"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -