PHP Class Segment_Consumer_Socket

Inheritance: extends Segment_QueueConsumer
Afficher le fichier Open project: segmentio/analytics-php

Protected Properties

Свойство Type Description
$type

Méthodes publiques

Méthode Description
__construct ( string $secret, array $options = [] ) Creates a new socket consumer for dispatching async requests immediately
flushBatch ( $batch )

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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 méthode

public flushBatch ( $batch )

Property Details

$type protected_oe property

protected $type