프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$appInstance | Application instance object | ||
$config | Configuration | ||
$connectionClass | Default connection class | ||
$maxAllowedPacket | Max allowed packet | ||
$maxConcurrency | Max concurrency | ||
$name | Name |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$enabled | Is enabled? | ||
$finished | Is finished? | ||
$instances | Instances storage | ||
$overload | Is overloaded? |
메소드 | 설명 | |
---|---|---|
__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 |
메소드 | 설명 | |
---|---|---|
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 | ||
리턴 | boolean |
public static getInstance ( string $arg = '', boolean $spawn = true ) : this | ||
$arg | string | name / array config / ConfigSection |
$spawn | boolean | Spawn? Default is true |
리턴 | this |
public onConfigUpdated ( ) : void | ||
리턴 | void |
public onShutdown ( boolean $graceful = false ) : boolean | ||
$graceful | boolean | |
리턴 | boolean | Ready to shutdown? |
public setConnectionClass ( string $class ) : void | ||
$class | string | Connection class name |
리턴 | void |