reference/curl/functions/curl-multi-add-handle.xml
b7f8c11e56ff1c57a2993e2ed7e5c5ace18637fd
...
...
@@ -10,12 +10,12 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>curl_multi_add_handle</methodname>
13
-
<methodparam><type>resource</type><parameter>mh</parameter></methodparam>
14
-
<methodparam><type>resource</type><parameter>ch</parameter></methodparam>
13
+
<methodparam><type>CurlMultiHandle</type><parameter>multi_handle</parameter></methodparam>
14
+
<methodparam><type>CurlHandle</type><parameter>handle</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
Adds the <parameter>ch</parameter> handle to the multi handle
18
-
<parameter>mh</parameter>
17
+
Adds the <parameter>handle</parameter> handle to the multi handle
18
+
<parameter>multi_handle</parameter>
19
19
</para>
20
20
</refsect1>
21
21
...
...
@@ -37,6 +37,24 @@
37
37
</para>
38
38
</refsect1>
39
39
40
+
<refsect1 role="changelog">
41
+
&reftitle.changelog;
42
+
<informaltable>
43
+
<tgroup cols="2">
44
+
<thead>
45
+
<row>
46
+
<entry>&Version;</entry>
47
+
<entry>&Description;</entry>
48
+
</row>
49
+
</thead>
50
+
<tbody>
51
+
&curl.changelog.multi-handle-param;
52
+
&curl.changelog.handle-param;
53
+
</tbody>
54
+
</tgroup>
55
+
</informaltable>
56
+
</refsect1>
57
+

40
58
<refsect1 role="examples">
41
59
&reftitle.examples;
42
60
<para>
...
...
@@ -66,11 +84,13 @@ $mh = curl_multi_init();
66
84
curl_multi_add_handle($mh,$ch1);
67
85
curl_multi_add_handle($mh,$ch2);
68
86

69
-
$running=null;
70
-
//execute the handles
87
+
//execute the multi handle
71
88
do {
72
-
curl_multi_exec($mh,$running);
73
-
} while($running > 0);
89
+
$status = curl_multi_exec($mh, $active);
90
+
if ($active) {
91
+
curl_multi_select($mh);
92
+
}
93
+
} while ($active && $status == CURLM_OK);
74
94

75
95
//close all the handles
76
96
curl_multi_remove_handle($mh, $ch1);
...
...
@@ -95,7 +115,6 @@ curl_multi_close($mh);
95
115
</refsect1>
96
116

97
117
</refentry>
98
-

99
118
<!-- Keep this comment at the end of the file
100
119
Local variables:
101
120
mode: sgml
102
121