PHP Class Sulu\Component\Websocket\RatchetAppManager

Inheritance: implements Sulu\Component\Websocket\AppManagerInterface
Mostrar archivo Open project: sulu/sulu

Public Methods

Method Description
__construct ( integer $port, string $httpHost = 'localhost', string $ipAddress = '127.0.0.1', React\EventLoop\LoopInterface $loop = null )
add ( $route, Sulu\Component\Websocket\WebsocketAppInterface $app, $allowedOrigins = ['*'], $httpHost = null )
getApp ( $name )
getApps ( )
getHttpHost ( )
getIpAddress ( )
getLoop ( ) : React\EventLoop\LoopInterface Return used event loop if null default loop will be created.
getPort ( )
run ( )

Method Details

__construct() public method

public __construct ( integer $port, string $httpHost = 'localhost', string $ipAddress = '127.0.0.1', React\EventLoop\LoopInterface $loop = null )
$port integer Port to listen on. If 80, assuming production, Flash on 843 otherwise expecting Flash to be proxied through 8843
$httpHost string HTTP hostname clients intend to connect to. MUST match JS `new WebSocket('ws://$httpHost');`
$ipAddress string IP address to bind to. Default is localhost/proxy only. '0.0.0.0' for any machine
$loop React\EventLoop\LoopInterface Specific React\EventLoop to bind the application to. null will create one for you

add() public method

public add ( $route, Sulu\Component\Websocket\WebsocketAppInterface $app, $allowedOrigins = ['*'], $httpHost = null )
$app Sulu\Component\Websocket\WebsocketAppInterface

getApp() public method

public getApp ( $name )

getApps() public method

public getApps ( )

getHttpHost() public method

public getHttpHost ( )

getIpAddress() public method

public getIpAddress ( )

getLoop() public method

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

getPort() public method

public getPort ( )

run() public method

public run ( )