PHP Класс Segment_Consumer_Socket

Наследование: extends Segment_QueueConsumer
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$type

Открытые методы

Метод Описание
__construct ( string $secret, array $options = [] ) Creates a new socket consumer for dispatching async requests immediately
flushBatch ( $batch )

Приватные методы

Метод Описание
createBody ( string $host, string $content ) : string Create the body to send as the post request.
createSocket ( )
makeRequest ( stream $socket, string $req, $retry = true ) : boolean Attempt to write the request to the socket, wait for response if debug mode is enabled.
parseResponse ( string $res ) : array Parse our response from the server, check header and body.

Описание методов

__construct() публичный Метод

Creates a new socket consumer for dispatching async requests immediately
public __construct ( string $secret, array $options = [] )
$secret string
$options array number "timeout" - the timeout for connecting function "error_handler" - function called back on errors. boolean "debug" - whether to use debug output, wait for response.

flushBatch() публичный Метод

public flushBatch ( $batch )

Описание свойств

$type защищенное свойство

protected $type