PHP Class Kraken\Network\NetworkServer

Inheritance: implements Kraken\Network\NetworkServerInterface
Show file Open project: kraken-php/framework

Public Properties

Property Type Description
$router Kraken\Network\Http\Component\Router\HttpRouterInterface

Protected Properties

Property Type Description
$firewall Kraken\Network\Socket\Component\Firewall\SocketFirewall | null
$http Kraken\Network\Http\HttpServer
$listener Kraken\Ipc\Socket\SocketListenerInterface
$server Kraken\Network\Socket\SocketServerInterface

Public Methods

Method Description
__construct ( Kraken\Ipc\Socket\SocketListenerInterface $listener, mixed[] $params = [] )
__destruct ( )
addRoute ( $path, Kraken\Network\NetworkComponentInterface $component )
blockAddress ( $address )
close ( )
existsRoute ( $path )
getBlockedAddresses ( )
getLoop ( )
isAddressBlocked ( $address )
isPaused ( )
pause ( )
removeRoute ( $path )
resume ( )
setLoop ( Kraken\Loop\LoopInterface $loop = null )
stop ( )
unblockAddress ( $address )

Protected Methods

Method Description
createFirewall ( ) Create and attach firewall to transfer server Firewall.

Method Details

__construct() public method

public __construct ( Kraken\Ipc\Socket\SocketListenerInterface $listener, mixed[] $params = [] )
$listener Kraken\Ipc\Socket\SocketListenerInterface
$params mixed[]

__destruct() public method

public __destruct ( )

addRoute() public method

public addRoute ( $path, Kraken\Network\NetworkComponentInterface $component )
$component Kraken\Network\NetworkComponentInterface

blockAddress() public method

public blockAddress ( $address )

close() public method

public close ( )

createFirewall() protected method

Create and attach firewall to transfer server Firewall.
protected createFirewall ( )

existsRoute() public method

public existsRoute ( $path )

getBlockedAddresses() public method

public getBlockedAddresses ( )

getLoop() public method

public getLoop ( )

isAddressBlocked() public method

public isAddressBlocked ( $address )

isPaused() public method

public isPaused ( )

pause() public method

public pause ( )

removeRoute() public method

public removeRoute ( $path )

resume() public method

public resume ( )

setLoop() public method

public setLoop ( Kraken\Loop\LoopInterface $loop = null )
$loop Kraken\Loop\LoopInterface

stop() public method

public stop ( )

unblockAddress() public method

public unblockAddress ( $address )

Property Details

$firewall protected property

protected SocketFirewall,Kraken\Network\Socket\Component\Firewall|null $firewall
return Kraken\Network\Socket\Component\Firewall\SocketFirewall | null

$http protected property

protected HttpServer,Kraken\Network\Http $http
return Kraken\Network\Http\HttpServer

$listener protected property

protected SocketListenerInterface,Kraken\Ipc\Socket $listener
return Kraken\Ipc\Socket\SocketListenerInterface

$router public property

public HttpRouterInterface,Kraken\Network\Http\Component\Router $router
return Kraken\Network\Http\Component\Router\HttpRouterInterface

$server protected property

protected SocketServerInterface,Kraken\Network\Socket $server
return Kraken\Network\Socket\SocketServerInterface