2011-03-12 07:14:32 +08:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\" * _ _ ____ _
|
|
|
|
.\" * Project ___| | | | _ \| |
|
|
|
|
.\" * / __| | | | |_) | |
|
|
|
|
.\" * | (__| |_| | _ <| |___
|
|
|
|
.\" * \___|\___/|_| \_\_____|
|
|
|
|
.\" *
|
2023-01-02 20:51:48 +08:00
|
|
|
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2011-03-12 07:14:32 +08:00
|
|
|
.\" *
|
|
|
|
.\" * This software is licensed as described in the file COPYING, which
|
|
|
|
.\" * you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
.\" * are also available at https://curl.se/docs/copyright.html.
|
2011-03-12 07:14:32 +08:00
|
|
|
.\" *
|
|
|
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
.\" * copies of the Software, and permit persons to whom the Software is
|
|
|
|
.\" * furnished to do so, under the terms of the COPYING file.
|
|
|
|
.\" *
|
|
|
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
.\" * KIND, either express or implied.
|
|
|
|
.\" *
|
|
|
|
.\" * SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
.\" *
|
2011-03-12 07:14:32 +08:00
|
|
|
.\" **************************************************************************
|
2023-04-26 14:58:35 +08:00
|
|
|
.TH curl_share_setopt 3 "8 Aug 2003" "libcurl" "libcurl"
|
2003-08-11 15:25:02 +08:00
|
|
|
.SH NAME
|
|
|
|
curl_share_setopt - Set options for a shared object
|
|
|
|
.SH SYNOPSIS
|
2021-11-26 21:20:18 +08:00
|
|
|
.nf
|
|
|
|
#include <curl/curl.h>
|
|
|
|
|
2003-08-11 15:25:02 +08:00
|
|
|
CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option, parameter);
|
2021-11-26 21:20:18 +08:00
|
|
|
.fi
|
2003-08-11 15:25:02 +08:00
|
|
|
.SH DESCRIPTION
|
|
|
|
Set the \fIoption\fP to \fIparameter\fP for the given \fIshare\fP.
|
|
|
|
.SH OPTIONS
|
2004-02-09 17:07:26 +08:00
|
|
|
.IP CURLSHOPT_LOCKFUNC
|
2021-11-12 17:56:05 +08:00
|
|
|
See \fICURLSHOPT_LOCKFUNC(3)\fP.
|
2004-02-09 17:07:26 +08:00
|
|
|
.IP CURLSHOPT_UNLOCKFUNC
|
2021-11-12 17:56:05 +08:00
|
|
|
See \fICURLSHOPT_UNLOCKFUNC(3)\fP.
|
2004-02-09 17:07:26 +08:00
|
|
|
.IP CURLSHOPT_SHARE
|
2021-11-12 17:56:05 +08:00
|
|
|
See \fICURLSHOPT_SHARE(3)\fP.
|
2004-02-09 17:07:26 +08:00
|
|
|
.IP CURLSHOPT_UNSHARE
|
2021-11-12 17:56:05 +08:00
|
|
|
See \fICURLSHOPT_UNSHARE(3)\fP.
|
2004-02-09 17:07:26 +08:00
|
|
|
.IP CURLSHOPT_USERDATA
|
2021-11-12 22:27:04 +08:00
|
|
|
See \fICURLSHOPT_USERDATA(3)\fP.
|
2021-10-25 14:54:08 +08:00
|
|
|
.SH EXAMPLE
|
|
|
|
.nf
|
2022-04-16 05:35:15 +08:00
|
|
|
CURLSHcode sh;
|
2021-10-25 14:54:08 +08:00
|
|
|
share = curl_share_init();
|
|
|
|
sh = curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
|
|
|
|
if(sh)
|
2021-11-05 06:48:23 +08:00
|
|
|
printf("Error: %s\\n", curl_share_strerror(sh));
|
2021-10-25 14:54:08 +08:00
|
|
|
.fi
|
|
|
|
.SH AVAILABILITY
|
2021-10-25 17:45:09 +08:00
|
|
|
Added in 7.10
|
2004-02-09 17:07:26 +08:00
|
|
|
.SH RETURN VALUE
|
|
|
|
CURLSHE_OK (zero) means that the option was set properly, non-zero means an
|
|
|
|
error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors.3\fP
|
|
|
|
man page for the full list with descriptions.
|
2003-08-11 15:25:02 +08:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR curl_share_cleanup "(3), " curl_share_init "(3)"
|