PHP Interface Sulu\Component\Websocket\AppManagerInterface

Afficher le fichier Open project: sulu/sulu Interface Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

add() public méthode

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() public méthode

Return websocket app.
public getApp ( string $name ) : Sulu\Component\Websocket\WebsocketAppInterface
$name string
Résultat Sulu\Component\Websocket\WebsocketAppInterface

getApps() public méthode

Returns apps and configuration.
public getApps ( ) : array
Résultat array

getHttpHost() public méthode

Returns HTTP hostname clients intend to connect to.
public getHttpHost ( ) : string
Résultat string

getIpAddress() public méthode

Return IP address to bind to.
public getIpAddress ( ) : string
Résultat string

getLoop() public méthode

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

getPort() public méthode

Returns port to listen on.
public getPort ( ) : integer
Résultat integer

run() public méthode

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