PHP Class PHPDaemon\Clients\GearmanClient\Connection

Inheritance: extends PHPDaemon\Network\ClientConnection
显示文件 Open project: kakserpom/phpdaemon

Public Properties

Property Type Description
$response mixed
$responseCommand string
$responseType string

Protected Properties

Property Type Description
$requestCommandList array Request codes
$requestCommandListFlipped
$responseCommandList array Response codes
$responseCommandListFlipped

Public Methods

Method Description
getStatus ( mixed $jobHandle, callable $cb = null ) Get job status
onRead ( ) : void Called when new data received
onReady ( ) : void Called when the connection is handshaked (at low-level), and peer is ready to recv. data
sendCommand ( $commandName, $payload, callable $cb = null ) Send a command
sendEcho ( $payload, callable | null $cb = null ) Function send ECHO
setConnectionOption ( integer $optionName, callable $cb = null ) Function set settings for current connection Available settings 'exceptions' - Forward WORK_EXCEPTION packets to the client.
submitJob ( $params, callable $cb = null ) Function run task and wait result in callback

Method Details

getStatus() public method

Get job status
public getStatus ( mixed $jobHandle, callable $cb = null )
$jobHandle mixed Job handle that was given in JOB_CREATED packet.
$cb callable = null

onRead() public method

Called when new data received
public onRead ( ) : void
return void

onReady() public method

Called when the connection is handshaked (at low-level), and peer is ready to recv. data
public onReady ( ) : void
return void

sendCommand() public method

Send a command
public sendCommand ( $commandName, $payload, callable $cb = null )
$commandName
$payload
$cb callable = null

sendEcho() public method

Function send ECHO
public sendEcho ( $payload, callable | null $cb = null )
$payload
$cb callable | null

setConnectionOption() public method

Function set settings for current connection Available settings 'exceptions' - Forward WORK_EXCEPTION packets to the client.
public setConnectionOption ( integer $optionName, callable $cb = null )
$optionName integer
$cb callable = null

submitJob() public method

Function run task and wait result in callback
public submitJob ( $params, callable $cb = null )
$params
$cb callable = null

Property Details

$requestCommandList protected_oe static_oe property

Request codes
protected static array $requestCommandList
return array

$requestCommandListFlipped protected_oe static_oe property

protected static $requestCommandListFlipped

$response public_oe property

public mixed $response
return mixed

$responseCommand public_oe property

public string $responseCommand
return string

$responseCommandList protected_oe static_oe property

Response codes
protected static array $responseCommandList
return array

$responseCommandListFlipped protected_oe static_oe property

protected static $responseCommandListFlipped

$responseType public_oe property

public string $responseType
return string