You are here

private function CurlMultiHandler::processMessages in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php \GuzzleHttp\Handler\CurlMultiHandler::processMessages()
1 call to CurlMultiHandler::processMessages()
CurlMultiHandler::tick in vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
Ticks the curl event loop.

File

vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php, line 161

Class

CurlMultiHandler
Returns an asynchronous response using curl_multi_* functions.

Namespace

GuzzleHttp\Handler

Code

private function processMessages() {
  while ($done = curl_multi_info_read($this->_mh)) {
    $id = (int) $done['handle'];
    curl_multi_remove_handle($this->_mh, $done['handle']);
    if (!isset($this->handles[$id])) {

      // Probably was cancelled.
      continue;
    }
    $entry = $this->handles[$id];
    unset($this->handles[$id], $this->delays[$id]);
    $entry['easy']->errno = $done['result'];
    $entry['deferred']
      ->resolve(CurlFactory::finish($this, $entry['easy'], $this->factory));
  }
}