reference/curl/functions/curl-multi-info-read.xml
b7f8c11e56ff1c57a2993e2ed7e5c5ace18637fd
...
...
@@ -9,9 +9,9 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>array</type><methodname>curl_multi_info_read</methodname>
13
-
<methodparam><type>resource</type><parameter>mh</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter role="reference">msgs_in_queue</parameter><initializer>&null;</initializer></methodparam>
12
+
<type class="union"><type>array</type><type>false</type></type><methodname>curl_multi_info_read</methodname>
13
+
<methodparam><type>CurlMultiHandle</type><parameter>multi_handle</parameter></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter role="reference">queued_messages</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Ask the multi handle if there are any messages or information from the individual transfers.
...
...
@@ -21,7 +21,7 @@
21
21
<para>
22
22
Repeated calls to this function will return a new result each time, until a &false; is returned
23
23
as a signal that there is no more to get at this point. The integer pointed to with
24
-
<parameter>msgs_in_queue</parameter> will contain the number of remaining messages after this
24
+
<parameter>queued_messages</parameter> will contain the number of remaining messages after this
25
25
function was called.
26
26
</para>
27
27
<warning>
...
...
@@ -38,7 +38,7 @@
38
38
<variablelist>
39
39
&curl.mh.description;
40
40
<varlistentry>
41
-
<term><parameter>msgs_in_queue</parameter></term>
41
+
<term><parameter>queued_messages</parameter></term>
42
42
<listitem>
43
43
<para>
44
44
Number of messages that are still in the queue
...
...
@@ -85,6 +85,23 @@
85
85
</para>
86
86
</refsect1>
87
87

88
+
<refsect1 role="changelog">
89
+
&reftitle.changelog;
90
+
<informaltable>
91
+
<tgroup cols="2">
92
+
<thead>
93
+
<row>
94
+
<entry>&Version;</entry>
95
+
<entry>&Description;</entry>
96
+
</row>
97
+
</thead>
98
+
<tbody>
99
+
&curl.changelog.multi-handle-param;
100
+
</tbody>
101
+
</tgroup>
102
+
</informaltable>
103
+
</refsect1>
104
+

88
105
<refsect1 role="examples">
89
106
&reftitle.examples;
90
107
<para>
...
...
@@ -110,11 +127,13 @@ foreach ($urls as $i => $url) {
110
127

111
128
do {
112
129
$status = curl_multi_exec($mh, $active);
113
-
$info = curl_multi_info_read($mh);
114
-
if (false !== $info) {
130
+
if ($active) {
131
+
curl_multi_select($mh);
132
+
}
133
+
while (false !== ($info = curl_multi_info_read($mh))) {
115
134
var_dump($info);
116
135
}
117
-
} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
136
+
} while ($active && $status == CURLM_OK);
118
137

119
138
foreach ($urls as $i => $url) {
120
139
$res[$i] = curl_multi_getcontent($conn[$i]);
...
...
@@ -160,30 +179,6 @@ bool(false)
160
179
</para>
161
180
</refsect1>
162
181
163
-
<refsect1 role="changelog">
164
-
&reftitle.changelog;
165
-
<para>
166
-
<informaltable>
167
-
<tgroup cols="2">
168
-
<thead>
169
-
<row>
170
-
<entry>&Version;</entry>
171
-
<entry>&Description;</entry>
172
-
</row>
173
-
</thead>
174
-
<tbody>
175
-
<row>
176
-
<entry>5.2.0</entry>
177
-
<entry>
178
-
<parameter>msgs_in_queue</parameter> was added.
179
-
</entry>
180
-
</row>
181
-
</tbody>
182
-
</tgroup>
183
-
</informaltable>
184
-
</para>
185
-
</refsect1>
186
-
187
182
<refsect1 role="seealso">
188
183
&reftitle.seealso;
189
184
<para>
...
...
@@ -194,7 +189,6 @@ bool(false)
194
189
</refsect1>
195
190

196
191
</refentry>
197
-

198
192
<!-- Keep this comment at the end of the file
199
193
Local variables:
200
194
mode: sgml
201
195