JavaScript Editor Javascript debugger     Website design 


HttpRequestPool::socketPerform

Perform socket actions ()
bool HttpRequestPool::socketPerform ( )

Returns TRUE until each request has finished its transaction.

Return Values

Returns TRUE until each request has finished its transaction.

Examples

Example 879. A HttpRequestPool::socketPerform() example

<?php
class MyPool extends HttpRequestPool
{
   public function
send()
   {
       while (
$this->socketPerform()) {
           if (!
$this->socketSelect()) {
               throw new
HttpSocketExcpetion;
           }
       }
   }

   protected final function
socketPerform()
   {
       
$result = parent::socketPerform();
       foreach (
$this->getFinishedRequests() as $r) {
           
$this->detach($r);
           
// handle response of finished request
       
}
       return
$result;
   }
}
?>