Свойство | Type | Description | |
---|---|---|---|
$appInstance | Application instance object | ||
$config | Configuration | ||
$connectionClass | Default connection class | ||
$maxAllowedPacket | Max allowed packet | ||
$maxConcurrency | Max concurrency | ||
$name | Name |
Свойство | Type | Description | |
---|---|---|---|
$enabled | Is enabled? | ||
$finished | Is finished? | ||
$instances | Instances storage | ||
$overload | Is overloaded? |
Méthode | Description | |
---|---|---|
__construct ( array $config = [], boolean $init = true ) | Constructor | |
attach ( object $conn, mixed $inf = null ) : void | Attach Connection | |
connect ( string $url, callback $cb, string $class = null ) : integer | Establish a connection with remote peer | |
detach ( object $conn ) : void | Detach Connection | |
disable ( ) : void | Disable all events of sockets | |
enable ( ) : void | Enable socket events | |
finish ( $graceful = false ) : boolean | Finishes ConnectionPool | |
getInstance ( string $arg = '', boolean $spawn = true ) : this | Returns instance object | |
onConfigUpdated ( ) : void | Called when worker is going to update configuration | |
onReady ( ) : void | Called when the worker is ready to go | |
onShutdown ( boolean $graceful = false ) : boolean | Called when application instance is going to shutdown | |
setConnectionClass ( string $class ) : void | Sets default connection class |
Méthode | Description | |
---|---|---|
applyConfig ( ) : void | Applies config | |
getConfigDefaults ( ) : boolean | Setting default config options | |
init ( ) : void | Init | |
onDisable ( ) : void | Called when ConnectionPool is now disabled | |
onEnable ( ) : void | Called when ConnectionPool is now enabled | |
onFinish ( ) : void | Called when ConnectionPool is finished |
public __construct ( array $config = [], boolean $init = true ) | ||
$config | array | Config variables |
$init | boolean |
protected getConfigDefaults ( ) : boolean | ||
Résultat | boolean |
public static getInstance ( string $arg = '', boolean $spawn = true ) : this | ||
$arg | string | name / array config / ConfigSection |
$spawn | boolean | Spawn? Default is true |
Résultat | this |
public onConfigUpdated ( ) : void | ||
Résultat | void |
public onShutdown ( boolean $graceful = false ) : boolean | ||
$graceful | boolean | |
Résultat | boolean | Ready to shutdown? |
public setConnectionClass ( string $class ) : void | ||
$class | string | Connection class name |
Résultat | void |