function 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 248
Class
- CurlMultiHandler
- Returns an asynchronous response using curl_multi_* functions.
Namespace
GuzzleHttp\HandlerCode
private function processMessages() : void {
while ($done = \curl_multi_info_read($this->_mh)) {
if ($done['msg'] !== \CURLMSG_DONE) {
// if it's not done, then it would be premature to remove the handle. ref https://github.com/guzzle/guzzle/pull/2892#issuecomment-945150216
continue;
}
$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));
}
}