Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.7.0

Request #5022 Non-Blocking Requests not support
Submitted: 2005-08-07 19:07 UTC
From: misc at keilonat dot de Assigned:
Status: Open Package: HTTP_Request2
PHP Version: 4.4.0 OS: Windows 2000
Roadmaps: (Not assigned)    
Subscription  


 [2005-08-07 19:07 UTC] misc at keilonat dot de
Description: ------------ Because HTTP_Request::sendRequest() does not only send the request as the name would suggest, but also fetches the data immediately, it is not possible to use this class nor classes based on this (e.g. HTTP_Client) to perform non-blocking (parallel) requests which is very pity. To perform non-blocking requests, one would have to do something like this: <?php $urls = array( 'http://pear.php.net', 'http://php.net', 'http://google.de' ); // only open socket and send request, // no fetching of data or headers! foreach($urls as $url) { $requests[$url] =& new HTTP_Request($url); $requests[$url]->sendRequest(); } // retrieval of data foreach($urls as $url) { $data = $requests[$url]->fetchData(); } ?> If the data is fetched immediately after the request, the effect of socket_set_blocking($fp, 0) is zilch.

Comments

 [2006-05-02 06:30 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2007-10-24 18:26 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2008-10-17 21:11 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!