PHP Interface Kraken\Network\NetworkServerInterface

Inheritance: extends Kraken\Loop\LoopResourceInterface
Afficher le fichier Open project: kraken-php/framework

Méthodes publiques

Méthode Description
addRoute ( string $path, Kraken\Network\NetworkComponentInterface $component ) : Kraken\Network\NetworkServerInterface Add an endpoint/application to the server.
blockAddress ( string $address ) : Kraken\Network\NetworkServerInterface Add an address to the blacklist that will not be allowed to connect to your application.
close ( ) Close the underlying SocketListner.
existsRoute ( string $path ) : boolean Check if there exists any endpoint/application to the server on given route.
getBlockedAddresses ( ) : string[] Get an array of all the addresses blocked.
isAddressBlocked ( string $address ) : boolean Check if given $address is blocked or not.
removeRoute ( string $path ) : Kraken\Network\NetworkServerInterface Remote endpoint/application from the server.
stop ( ) Close the underlying SocketListner.
unblockAddress ( string $address ) : Kraken\Network\NetworkServerInterface Unblock an address so they can access your application again.

Method Details

addRoute() public méthode

Add an endpoint/application to the server.
public addRoute ( string $path, Kraken\Network\NetworkComponentInterface $component ) : Kraken\Network\NetworkServerInterface
$path string
$component Kraken\Network\NetworkComponentInterface
Résultat Kraken\Network\NetworkServerInterface

blockAddress() public méthode

Add an address to the blacklist that will not be allowed to connect to your application.
public blockAddress ( string $address ) : Kraken\Network\NetworkServerInterface
$address string
Résultat Kraken\Network\NetworkServerInterface

close() public méthode

Close the underlying SocketListner.
public close ( )

existsRoute() public méthode

Check if there exists any endpoint/application to the server on given route.
public existsRoute ( string $path ) : boolean
$path string
Résultat boolean

getBlockedAddresses() public méthode

Get an array of all the addresses blocked.
public getBlockedAddresses ( ) : string[]
Résultat string[]

isAddressBlocked() public méthode

Check if given $address is blocked or not.
public isAddressBlocked ( string $address ) : boolean
$address string
Résultat boolean

removeRoute() public méthode

Remote endpoint/application from the server.
public removeRoute ( string $path ) : Kraken\Network\NetworkServerInterface
$path string
Résultat Kraken\Network\NetworkServerInterface

stop() public méthode

Close the underlying SocketListner.
public stop ( )

unblockAddress() public méthode

Unblock an address so they can access your application again.
public unblockAddress ( string $address ) : Kraken\Network\NetworkServerInterface
$address string
Résultat Kraken\Network\NetworkServerInterface