PHP 클래스 PHPDaemon\Servers\WebSocket\Pool

상속: extends PHPDaemon\Network\Server, use trait PHPDaemon\Traits\EventHandlers
파일 보기 프로젝트 열기: kakserpom/phpdaemon 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$routes array

공개 메소드들

메소드 설명
addRoute ( string $path, callable $cb ) : boolean Adds a route if it doesn't exist already.
getRoute ( string $path, object $client, boolean $withoutCustomTransport = false ) : mixed
getRouteOptions ( string $path ) : array Return options by route
removeRoute ( string $path ) : boolean Removes a route.
routeExists ( string $path ) : boolean Checks if route exists
setRoute ( string $path, callable $cb ) : boolean Force add/replace a route.
setRouteOptions ( string $path, array $opts ) : boolean Sets an array of options associated to the route

보호된 메소드들

메소드 설명
getConfigDefaults ( ) : array | boolean Setting default config options Overriden from ConnectionPool::getConfigDefaults

메소드 상세

addRoute() 공개 메소드

Adds a route if it doesn't exist already.
public addRoute ( string $path, callable $cb ) : boolean
$path string Route name.
$cb callable Route's callback.
리턴 boolean Success.

getConfigDefaults() 보호된 메소드

Setting default config options Overriden from ConnectionPool::getConfigDefaults
protected getConfigDefaults ( ) : array | boolean
리턴 array | boolean

getRoute() 공개 메소드

public getRoute ( string $path, object $client, boolean $withoutCustomTransport = false ) : mixed
$path string
$client object
$withoutCustomTransport boolean
리턴 mixed

getRouteOptions() 공개 메소드

Return options by route
public getRouteOptions ( string $path ) : array
$path string Route name
리턴 array Options

removeRoute() 공개 메소드

Removes a route.
public removeRoute ( string $path ) : boolean
$path string Route name
리턴 boolean Success

routeExists() 공개 메소드

Checks if route exists
public routeExists ( string $path ) : boolean
$path string Route name
리턴 boolean Exists?

setRoute() 공개 메소드

Force add/replace a route.
public setRoute ( string $path, callable $cb ) : boolean
$path string Path
$cb callable Callback
리턴 boolean Success

setRouteOptions() 공개 메소드

Sets an array of options associated to the route
public setRouteOptions ( string $path, array $opts ) : boolean
$path string Route name.
$opts array Options
리턴 boolean Success.

프로퍼티 상세

$routes 공개적으로 프로퍼티

public array $routes
리턴 array