HttpRequestPool::socketPerform
(PECL pecl_http:0.15.0-1.5.5)
HttpRequestPool::socketPerform — Perform socket actions
Описание
protected
bool HttpRequestPool::socketPerform
( void
)
Returns TRUE until each request has finished its transaction.
Возвращаемые значения
Returns TRUE until each request has finished its transaction.
Примеры
Пример #1 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;
}
}
?>
[an error occurred while processing the directive]
- Функция HttpRequestPool::attach() - Attach HttpRequest
- Функция HttpRequestPool::__construct() - HttpRequestPool constructor
- Функция HttpRequestPool::__destruct() - HttpRequestPool destructor
- Функция HttpRequestPool::detach() - Detach HttpRequest
- Функция HttpRequestPool::getAttachedRequests() - Get attached requests
- Функция HttpRequestPool::getFinishedRequests() - Get finished requests
- Функция HttpRequestPool::reset() - Reset request pool
- Функция HttpRequestPool::send() - Send all requests
- Функция HttpRequestPool::socketPerform() - Perform socket actions
- Функция HttpRequestPool::socketSelect() - Perform socket select
Коментарии
404 Not Found