From 624d6e2d2b7449fcbc736a1536521261704f7da7 Mon Sep 17 00:00:00 2001
From: Michael Wallner
+
Instantiate a new HttpRequestPool object. An HttpRequestPool is
+able to send several HttpRequests in parallel.
+
+Example:
+
+<?php
$urls = array('www.php.net', 'pecl.php.net', 'pear.php.net')
$pool = new HttpRequestPool;
foreach ($urls as $url) {
$req[$url] = new HttpRequest("http://$url", HTTP_HEAD);
$pool->attach($req[$url]);
}
$pool->send();
foreach ($urls as $url) {
printf("%s (%s) is %s\n",
$url, $req[$url]->getResponseInfo('effective_url'),
$r->getResponseCode() == 200 ? 'alive' : 'not alive'
);
}
?>
+
+
+
+
Clean up HttpRequestPool object.
+Detach all attached HttpRequest objects.
+Attach an HttpRequest object to this HttpRequestPool.
+NOTE: set all options prior attaching!
Detach an HttpRequest object from this HttpRequestPool.
+Send all attached HttpRequest objects in parallel.
+Usage:
+
+<?php
while ($pool->socketSend()) {
do_something_else();
if (!$pool->socketSelect()) {
die('Socket error');
}
}
$pool->socketRead();
?>
+
+
+
+
See HttpRequestPool::socketSend().
+See HttpRequestPool::socketSend().
Generated at: Mon, 6 Jun 2005 13:44:11 +0200
+Generated at: Tue, 14 Jun 2005 16:56:52 +0200