PHP 클래스 PHPDaemon\Network\Server

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

공개 프로퍼티들

프로퍼티 타입 설명
$allowedClients Allowed clients

보호된 프로퍼티들

프로퍼티 타입 설명
$bound Bound sockets

공개 메소드들

메소드 설명
__construct ( array $config = [], boolean $init = true ) Constructor
attachBound ( Generic $bound, mixed $inf = null ) : void Attach Generic
bindSocket ( string $uri ) : boolean Bind given socket
bindSockets ( mixed $addrs = [], integer $max ) : integer Bind given sockets
closeBound ( ) : void Close each of binded sockets
detachBound ( Generic $bound ) : void Detach Generic
inheritFromRequest ( object $req, object $oldConn ) : boolean Called when a request to HTTP-server looks like another connection

보호된 메소드들

메소드 설명
applyConfig ( ) : void Applies config
onDisable ( ) : void Called when ConnectionPool is now disabled
onEnable ( ) : void Called when ConnectionPool is now enabled
onFinish ( ) : void Called when ConnectionPool is finished

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( array $config = [], boolean $init = true )
$config array Config variables
$init boolean

applyConfig() 보호된 메소드

Applies config
protected applyConfig ( ) : void
리턴 void

attachBound() 공개 메소드

Attach Generic
public attachBound ( Generic $bound, mixed $inf = null ) : void
$bound PHPDaemon\BoundSocket\Generic Generic
$inf mixed Info
리턴 void

bindSocket() 공개 메소드

Bind given socket
public bindSocket ( string $uri ) : boolean
$uri string Address to bind
리턴 boolean Success

bindSockets() 공개 메소드

Bind given sockets
public bindSockets ( mixed $addrs = [], integer $max ) : integer
$addrs mixed Addresses to bind
$max integer Maximum
리턴 integer Number of bound

closeBound() 공개 메소드

Close each of binded sockets
public closeBound ( ) : void
리턴 void

detachBound() 공개 메소드

Detach Generic
public detachBound ( Generic $bound ) : void
$bound PHPDaemon\BoundSocket\Generic Generic
리턴 void

inheritFromRequest() 공개 메소드

Called when a request to HTTP-server looks like another connection
public inheritFromRequest ( object $req, object $oldConn ) : boolean
$req object Request
$oldConn object Connection
리턴 boolean Success

onDisable() 보호된 메소드

Called when ConnectionPool is now disabled
protected onDisable ( ) : void
리턴 void

onEnable() 보호된 메소드

Called when ConnectionPool is now enabled
protected onEnable ( ) : void
리턴 void

onFinish() 보호된 메소드

Called when ConnectionPool is finished
protected onFinish ( ) : void
리턴 void

프로퍼티 상세

$allowedClients 공개적으로 프로퍼티

Allowed clients
public $allowedClients

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

Bound sockets
protected $bound