Property | Type | Description | |
---|---|---|---|
$type |
Method | Description | |
---|---|---|
__construct ( string $secret, array $options = [] ) | Creates a new socket consumer for dispatching async requests immediately | |
flushBatch ( $batch ) |
Method | 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. |
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. |