PHP 클래스 PHPDaemon\Network\ClientConnection

저자: Vasily Zorin ([email protected])
상속: extends Connection
파일 보기 프로젝트 열기: kakserpom/phpdaemon 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$acquired Acquired?
$busy Busy?
$maxQueue
$noSAF No Send-and-Forget?
$onResponse Stack of onResponse callbacks
$timeout Timeout

공개 메소드들

메소드 설명
__construct ( resource $fd, mixed $pool = null ) Constructor
acquire ( ) : void Acquire the connection
checkFree ( ) : void Set connection free/busy according to onResponse emptiness and ->finished
getQueueLength ( ) : integer getQueueLength
isBusy ( ) : boolean Busy?
isQueueEmpty ( ) : boolean isQueueEmpty
onFinish ( ) : void Called when connection finishes
onReady ( ) : void Called when the connection is handshaked (at low-level), and peer is ready to recv. data
onResponse ( callable $cb ) : void Push callback to onReponse stack
release ( ) : void Release the connection
setFree ( boolean $free = true ) : void Set connection free/busy

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( resource $fd, mixed $pool = null )
$fd resource File descriptor
$pool mixed ConnectionPool

acquire() 공개 메소드

Acquire the connection
public acquire ( ) : void
리턴 void

checkFree() 공개 메소드

Set connection free/busy according to onResponse emptiness and ->finished
public checkFree ( ) : void
리턴 void

getQueueLength() 공개 메소드

getQueueLength
public getQueueLength ( ) : integer
리턴 integer

isBusy() 공개 메소드

Busy?
public isBusy ( ) : boolean
리턴 boolean

isQueueEmpty() 공개 메소드

isQueueEmpty
public isQueueEmpty ( ) : boolean
리턴 boolean

onFinish() 공개 메소드

Called when connection finishes
public onFinish ( ) : void
리턴 void

onReady() 공개 메소드

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

onResponse() 공개 메소드

Push callback to onReponse stack
public onResponse ( callable $cb ) : void
$cb callable Callback
리턴 void

release() 공개 메소드

Release the connection
public release ( ) : void
리턴 void

setFree() 공개 메소드

Set connection free/busy
public setFree ( boolean $free = true ) : void
$free boolean Free?
리턴 void

프로퍼티 상세

$acquired 보호되어 있는 프로퍼티

Acquired?
protected $acquired

$busy 보호되어 있는 프로퍼티

Busy?
protected $busy

$maxQueue 보호되어 있는 프로퍼티

protected $maxQueue

$noSAF 보호되어 있는 프로퍼티

No Send-and-Forget?
protected $noSAF

$onResponse 보호되어 있는 프로퍼티

Stack of onResponse callbacks
protected $onResponse

$timeout 보호되어 있는 프로퍼티

Timeout
protected $timeout