PHP 인터페이스 Sulu\Component\Websocket\AppManagerInterface

파일 보기 프로젝트 열기: sulu/sulu 0 사용 예제들

공개 메소드들

메소드 설명
add ( string $route, Sulu\Component\Websocket\WebsocketAppInterface $app, array $allowedOrigins = ['*'], string $httpHost = null )
getApp ( string $name ) : Sulu\Component\Websocket\WebsocketAppInterface Return websocket app.
getApps ( ) : array Returns apps and configuration.
getHttpHost ( ) : string Returns HTTP hostname clients intend to connect to.
getIpAddress ( ) : string Return IP address to bind to.
getLoop ( ) : React\EventLoop\LoopInterface Return used event loop if null default loop will be created.
getPort ( ) : integer Returns port to listen on.
run ( ) Run the server by entering the event loop.

메소드 상세

add() 공개 메소드

public add ( string $route, Sulu\Component\Websocket\WebsocketAppInterface $app, array $allowedOrigins = ['*'], string $httpHost = null )
$route string The URI the client will connect to
$app Sulu\Component\Websocket\WebsocketAppInterface Your application to server for the route. If not specified, assumed to be for a WebSocket
$allowedOrigins array An array of hosts allowed to connect (same host by default), ['*'] for any
$httpHost string Override the $httpHost variable provided in the __construct

getApp() 공개 메소드

Return websocket app.
public getApp ( string $name ) : Sulu\Component\Websocket\WebsocketAppInterface
$name string
리턴 Sulu\Component\Websocket\WebsocketAppInterface

getApps() 공개 메소드

Returns apps and configuration.
public getApps ( ) : array
리턴 array

getHttpHost() 공개 메소드

Returns HTTP hostname clients intend to connect to.
public getHttpHost ( ) : string
리턴 string

getIpAddress() 공개 메소드

Return IP address to bind to.
public getIpAddress ( ) : string
리턴 string

getLoop() 공개 메소드

Return used event loop if null default loop will be created.
public getLoop ( ) : React\EventLoop\LoopInterface
리턴 React\EventLoop\LoopInterface

getPort() 공개 메소드

Returns port to listen on.
public getPort ( ) : integer
리턴 integer

run() 공개 메소드

Run the server by entering the event loop.
public run ( )