2011-03-12 07:14:32 +08:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\" * _ _ ____ _
|
|
|
|
.\" * Project ___| | | | _ \| |
|
|
|
|
.\" * / __| | | | |_) | |
|
|
|
|
.\" * | (__| |_| | _ <| |___
|
|
|
|
.\" * \___|\___/|_| \_\_____|
|
|
|
|
.\" *
|
2020-12-31 17:11:49 +08:00
|
|
|
.\" * Copyright (C) 1998 - 2022, 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
|
|
|
.\" **************************************************************************
|
2014-11-04 16:46:41 +08:00
|
|
|
.TH curl_multi_setopt 3 "4 Nov 2014" "libcurl 7.39.0" "libcurl Manual"
|
2006-01-16 07:15:24 +08:00
|
|
|
.SH NAME
|
|
|
|
curl_multi_setopt \- set options for a curl multi handle
|
|
|
|
.SH SYNOPSIS
|
2021-11-26 21:20:18 +08:00
|
|
|
.nf
|
2006-01-16 07:15:24 +08:00
|
|
|
#include <curl/curl.h>
|
|
|
|
|
2021-10-20 22:00:46 +08:00
|
|
|
CURLMcode curl_multi_setopt(CURLM *multi_handle, CURLMoption option, param);
|
2021-11-26 21:20:18 +08:00
|
|
|
.fi
|
2006-01-16 07:15:24 +08:00
|
|
|
.SH DESCRIPTION
|
2014-11-04 06:11:37 +08:00
|
|
|
\fIcurl_multi_setopt(3)\fP is used to tell a libcurl multi handle how to
|
|
|
|
behave. By using the appropriate options to \fIcurl_multi_setopt(3)\fP, you
|
2021-11-26 15:46:59 +08:00
|
|
|
can change libcurl's behavior when using that multi handle. All options are
|
2014-11-04 06:11:37 +08:00
|
|
|
set with the \fIoption\fP followed by the parameter \fIparam\fP. That
|
|
|
|
parameter can be a \fBlong\fP, a \fBfunction pointer\fP, an \fBobject
|
|
|
|
pointer\fP or a \fBcurl_off_t\fP type, depending on what the specific option
|
|
|
|
expects. Read this manual carefully as bad input values may cause libcurl to
|
2021-11-26 15:46:59 +08:00
|
|
|
behave badly. You can only set one option in each function call.
|
2006-01-16 07:15:24 +08:00
|
|
|
|
|
|
|
.SH OPTIONS
|
2015-06-25 05:55:12 +08:00
|
|
|
.IP CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE
|
|
|
|
See \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP
|
|
|
|
.IP CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE
|
|
|
|
See \fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP
|
2013-02-15 18:50:45 +08:00
|
|
|
.IP CURLMOPT_MAX_HOST_CONNECTIONS
|
2014-11-04 16:46:41 +08:00
|
|
|
See \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP
|
2013-02-15 18:50:45 +08:00
|
|
|
.IP CURLMOPT_MAX_PIPELINE_LENGTH
|
2014-11-04 16:46:41 +08:00
|
|
|
See \fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP
|
2015-06-25 05:55:12 +08:00
|
|
|
.IP CURLMOPT_MAX_TOTAL_CONNECTIONS
|
|
|
|
See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP
|
|
|
|
.IP CURLMOPT_MAXCONNECTS
|
|
|
|
See \fICURLMOPT_MAXCONNECTS(3)\fP
|
|
|
|
.IP CURLMOPT_PIPELINING
|
|
|
|
See \fICURLMOPT_PIPELINING(3)\fP
|
2013-02-15 18:50:45 +08:00
|
|
|
.IP CURLMOPT_PIPELINING_SITE_BL
|
2014-11-04 16:46:41 +08:00
|
|
|
See \fICURLMOPT_PIPELINING_SITE_BL(3)\fP
|
2013-02-15 18:50:45 +08:00
|
|
|
.IP CURLMOPT_PIPELINING_SERVER_BL
|
2014-11-04 16:46:41 +08:00
|
|
|
See \fICURLMOPT_PIPELINING_SERVER_BL(3)\fP
|
2015-06-25 05:52:58 +08:00
|
|
|
.IP CURLMOPT_PUSHFUNCTION
|
|
|
|
See \fICURLMOPT_PUSHFUNCTION(3)\fP
|
|
|
|
.IP CURLMOPT_PUSHDATA
|
|
|
|
See \fICURLMOPT_PUSHDATA(3)\fP
|
2015-06-25 05:55:12 +08:00
|
|
|
.IP CURLMOPT_SOCKETFUNCTION
|
|
|
|
See \fICURLMOPT_SOCKETFUNCTION(3)\fP
|
|
|
|
.IP CURLMOPT_SOCKETDATA
|
|
|
|
See \fICURLMOPT_SOCKETDATA(3)\fP
|
|
|
|
.IP CURLMOPT_TIMERFUNCTION
|
|
|
|
See \fICURLMOPT_TIMERFUNCTION(3)\fP
|
|
|
|
.IP CURLMOPT_TIMERDATA
|
|
|
|
See \fICURLMOPT_TIMERDATA(3)\fP
|
2019-09-24 20:56:11 +08:00
|
|
|
.IP CURLMOPT_MAX_CONCURRENT_STREAMS
|
|
|
|
See \fICURLMOPT_MAX_CONCURRENT_STREAMS(3)\fP
|
2021-10-25 14:54:08 +08:00
|
|
|
.SH EXAMPLE
|
|
|
|
.fi
|
|
|
|
/* Limit the amount of simultaneous connections curl should allow: */
|
|
|
|
curl_multi_setopt(handle, CURLMOPT_MAXCONNECTS, (long)MAX_PARALLEL);
|
|
|
|
.nf
|
|
|
|
.SH AVAILABILITY
|
2021-10-25 17:45:09 +08:00
|
|
|
Added in 7.15.4
|
2021-10-25 13:50:25 +08:00
|
|
|
.SH RETURN VALUE
|
2006-01-16 07:15:24 +08:00
|
|
|
The standard CURLMcode for multi interface error codes. Note that it returns a
|
|
|
|
CURLM_UNKNOWN_OPTION if you try setting an option that this version of libcurl
|
2021-10-31 23:34:44 +08:00
|
|
|
does not know of.
|
2006-01-16 07:15:24 +08:00
|
|
|
.SH "SEE ALSO"
|
|
|
|
.BR curl_multi_cleanup "(3), " curl_multi_init "(3), "
|
|
|
|
.BR curl_multi_socket "(3), " curl_multi_info_read "(3)"
|