/
curl-multi-setopt.xml
188 lines (177 loc) · 5.88 KB
/
curl-multi-setopt.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.curl-multi-setopt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>curl_multi_setopt</refname>
<refpurpose>Set an option for the cURL multi handle</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>curl_multi_setopt</methodname>
<methodparam><type>resource</type><parameter>mh</parameter></methodparam>
<methodparam><type>int</type><parameter>option</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
</methodsynopsis>
<para>
</para>
&warn.undocumented.func;
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>mh</parameter></term>
<listitem>
<para>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>option</parameter></term>
<listitem>
<para>
One of the <constant>CURLMOPT_*</constant> constants.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>
The value to be set on <parameter>option</parameter>.
</para>
<para>
<parameter>value</parameter> should be an <type>int</type> for the
following values of the <parameter>option</parameter> parameter:
<informaltable>
<tgroup cols="3">
<thead>
<row>
<entry valign="top">Option</entry>
<entry valign="top">Set <parameter>value</parameter> to</entry>
</row>
</thead>
<tbody>
<row>
<entry valign="top"><constant>CURLMOPT_PIPELINING</constant></entry>
<entry valign="top">
Pass 1 to enable or 0 to disable. Enabling pipelining on a multi
handle will make it attempt to perform HTTP Pipelining as far as
possible for transfers using this handle. This means that if you add
a second request that can use an already existing connection, the
second request will be "piped" on the same connection.
As of cURL 7.43.0 you can also pass 2 to try to multiplex the new
transfer over an existing HTTP/2 connection if possible.
Instead of integer literals, you can also use the CURLPIPE_*
constants if available.
</entry>
</row>
<row>
<entry valign="top"><constant>CURLMOPT_MAXCONNECTS</constant></entry>
<entry valign="top">
Pass a number that will be used as the maximum amount of
simultaneously open connections that libcurl may cache.
By default the size will be enlarged to fit four times the number
of handles added via <function>curl_multi_add_handle</function>.
When the cache is full, curl closes the oldest one in the cache
to prevent the number of open connections from increasing.
</entry>
</row>
<row>
<entry valign="top"><constant>CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</constant></entry>
<entry valign="top">
Pass a number that specifies the chunk length threshold for pipelining
in bytes.
</entry>
</row>
<row>
<entry valign="top"><constant>CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE</constant></entry>
<entry valign="top">
Pass a number that specifies the size threshold for pipelining
penalty in bytes.
</entry>
</row>
<row>
<entry valign="top"><constant>CURLMOPT_MAX_HOST_CONNECTIONS</constant></entry>
<entry valign="top">
Pass a number that specifies the maximum number of connections to a
single host.
</entry>
</row>
<row>
<entry valign="top"><constant>CURLMOPT_MAX_PIPELINE_LENGTH</constant></entry>
<entry valign="top">
Pass a number that specifies the maximum number of requests in a
pipeline.
</entry>
</row>
<row>
<entry valign="top"><constant>CURLMOPT_MAX_TOTAL_CONNECTIONS</constant></entry>
<entry valign="top">
Pass a number that specifies the maximum number of simultaneously
open connections.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.0.7</entry>
<entry>
Introduced <constant>CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</constant>,
<constant>CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE</constant>,
<constant>CURLMOPT_MAX_HOST_CONNECTIONS</constant>,
<constant>CURLMOPT_MAX_PIPELINE_LENGTH</constant> and
<constant>CURLMOPT_MAX_TOTAL_CONNECTIONS</constant>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->