PHP Интерфейс Sulu\Component\Websocket\AppManagerInterface

Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
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 ( )