reference/curl/functions/curl-multi-setopt.xml
054a327c0f5802cb86c110f9b25b7caff9613f95
...
...
@@ -1,39 +1,29 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="function.curl-multi-setopt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>curl_multi_setopt</refname>
7
-
<refpurpose>Set an option for the cURL multi handle</refpurpose>
6
+
<refpurpose>Set a cURL multi option</refpurpose>
8
7
</refnamediv>
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
11
<methodsynopsis>
13
12
<type>bool</type><methodname>curl_multi_setopt</methodname>
14
-
<methodparam><type>resource</type><parameter>mh</parameter></methodparam>
13
+
<methodparam><type>CurlMultiHandle</type><parameter>multi_handle</parameter></methodparam>
15
14
<methodparam><type>int</type><parameter>option</parameter></methodparam>
16
15
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
17
16
</methodsynopsis>
18
17
<para>
19
-

18
+
Sets an option on the given cURL multi handle.
20
19
</para>
21
20

22
-
&warn.undocumented.func;
23
-

24
21
</refsect1>
25
22

26
23
<refsect1 role="parameters">
27
24
&reftitle.parameters;
28
25
<variablelist>
29
-
<varlistentry>
30
-
<term><parameter>mh</parameter></term>
31
-
<listitem>
32
-
<para>
33
-
34
-
</para>
35
-
</listitem>
36
-
</varlistentry>
26
+
&curl.mh.description;
37
27
<varlistentry>
38
28
<term><parameter>option</parameter></term>
39
29
<listitem>
...
...
@@ -68,8 +58,11 @@
68
58
possible for transfers using this handle. This means that if you add
69
59
a second request that can use an already existing connection, the
70
60
second request will be "piped" on the same connection.
71
-
As of cURL 7.43.0 you can also pass 2 to try to multiplex the new
61
+
As of cURL 7.43.0, the value is a bitmask, and you can also pass 2 to try to multiplex the new
72
62
transfer over an existing HTTP/2 connection if possible.
63
+
Passing 3 instructs cURL to ask for pipelining and multiplexing
64
+
independently of each other.
65
+
As of cURL 7.62.0, setting the pipelining bit has no effect.
73
66
Instead of integer literals, you can also use the CURLPIPE_*
74
67
constants if available.
75
68
</entry>
...
...
@@ -100,6 +93,16 @@
100
93
</entry>
101
94
</row>
102
95
<row>
96
+
<entry valign="top"><constant>CURLMOPT_MAX_CONCURRENT_STREAMS</constant></entry>
97
+
<entry valign="top">
98
+
The set number will be used as the maximum number of concurrent streams for a connections that cURL
99
+
should support on connections done using HTTP/2. Valid values range from
100
+
<literal>1</literal> to <literal>2147483647</literal> (<literal>2^31 - 1</literal>).
101
+
The value passed here would be honored based on other system resources properties.
102
+
Default is <literal>100</literal>.
103
+
</entry>
104
+
</row>
105
+
<row>
103
106
<entry valign="top"><constant>CURLMOPT_MAX_HOST_CONNECTIONS</constant></entry>
104
107
<entry valign="top">
105
108
Pass a number that specifies the maximum number of connections to a
...
...
@@ -120,6 +123,48 @@
120
123
open connections.
121
124
</entry>
122
125
</row>
126
+
<row>
127
+
<entry valign="top"><constant>CURLMOPT_PUSHFUNCTION</constant></entry>
128
+
<entry valign="top">
129
+
Pass a <type>callable</type> that will be registered to handle server
130
+
pushes and should have the following signature:
131
+
<methodsynopsis>
132
+
<type>int</type><methodname><replaceable>pushfunction</replaceable></methodname>
133
+
<methodparam><type>resource</type><parameter>parent_ch</parameter></methodparam>
134
+
<methodparam><type>resource</type><parameter>pushed_ch</parameter></methodparam>
135
+
<methodparam><type>array</type><parameter>headers</parameter></methodparam>
136
+
</methodsynopsis>
137
+
<variablelist>
138
+
<varlistentry>
139
+
<term><parameter>parent_ch</parameter></term>
140
+
<listitem>
141
+
<para>
142
+
The parent cURL handle (the request the client made).
143
+
</para>
144
+
</listitem>
145
+
</varlistentry>
146
+
<varlistentry>
147
+
<term><parameter>pushed_ch</parameter></term>
148
+
<listitem>
149
+
<para>
150
+
A new cURL handle for the pushed request.
151
+
</para>
152
+
</listitem>
153
+
</varlistentry>
154
+
<varlistentry>
155
+
<term><parameter>headers</parameter></term>
156
+
<listitem>
157
+
<para>
158
+
The push promise headers.
159
+
</para>
160
+
</listitem>
161
+
</varlistentry>
162
+
</variablelist>
163
+
The push function is supposed to return either
164
+
<constant>CURL_PUSH_OK</constant> if it can handle the push, or
165
+
<constant>CURL_PUSH_DENY</constant> to reject it.
166
+
</entry>
167
+
</row>
123
168
</tbody>
124
169
</tgroup>
125
170
</informaltable>
...
...
@@ -149,6 +194,19 @@
149
194
</thead>
150
195
<tbody>
151
196
<row>
197
+
<entry>8.2.0</entry>
198
+
<entry>
199
+
Introduced <constant>CURLMOPT_MAX_CONCURRENT_STREAMS</constant>.
200
+
</entry>
201
+
</row>
202
+
&curl.changelog.multi-handle-param;
203
+
<row>
204
+
<entry>7.1.0</entry>
205
+
<entry>
206
+
Introduced <constant>CURLMOPT_PUSHFUNCTION</constant>.
207
+
</entry>
208
+
</row>
209
+
<row>
152
210
<entry>7.0.7</entry>
153
211
<entry>
154
212
Introduced <constant>CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE</constant>,
...
...
@@ -165,7 +223,6 @@
165
223
</refsect1>
166
224

167
225
</refentry>
168
-

169
226
<!-- Keep this comment at the end of the file
170
227
Local variables:
171
228
mode: sgml
172
229