PHP 클래스 PHPDaemon\Clients\GearmanClient\Connection

상속: extends PHPDaemon\Network\ClientConnection
파일 보기 프로젝트 열기: kakserpom/phpdaemon

공개 프로퍼티들

프로퍼티 타입 설명
$response mixed
$responseCommand string
$responseType string

보호된 프로퍼티들

프로퍼티 타입 설명
$requestCommandList array Request codes
$requestCommandListFlipped
$responseCommandList array Response codes
$responseCommandListFlipped

공개 메소드들

메소드 설명
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

메소드 상세

getStatus() 공개 메소드

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() 공개 메소드

Called when new data received
public onRead ( ) : void
리턴 void

onReady() 공개 메소드

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

sendCommand() 공개 메소드

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

sendEcho() 공개 메소드

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

setConnectionOption() 공개 메소드

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() 공개 메소드

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

프로퍼티 상세

$requestCommandList 보호되어 있는 정적으로 프로퍼티

Request codes
protected static array $requestCommandList
리턴 array

$requestCommandListFlipped 보호되어 있는 정적으로 프로퍼티

protected static $requestCommandListFlipped

$response 공개적으로 프로퍼티

public mixed $response
리턴 mixed

$responseCommand 공개적으로 프로퍼티

public string $responseCommand
리턴 string

$responseCommandList 보호되어 있는 정적으로 프로퍼티

Response codes
protected static array $responseCommandList
리턴 array

$responseCommandListFlipped 보호되어 있는 정적으로 프로퍼티

protected static $responseCommandListFlipped

$responseType 공개적으로 프로퍼티

public string $responseType
리턴 string