Property | Type | Description | |
---|---|---|---|
$appInstance | |||
$attrs | |||
$client |
Property | Type | Description | |
---|---|---|---|
$running |
Method | Description | |
---|---|---|
__construct ( |
Called when client connected. | |
gracefulShutdown ( ) : boolean | Called when the worker is going to shutdown. | |
handleException ( $e ) : boolean | Uncaught exception handler | |
onFinish ( ) : void | Called when session finished. | |
onFrame ( string $data, integer $type ) : void | Called when new frame is received | |
onHandshake ( ) : void | Called when the connection is handshaked. | |
onSleep ( ) : void | Called when the request starts sleep | |
onWakeup ( ) : void | Called when the request wakes up | |
setcookie ( string $name, string $value = '', integer $maxage, string $path = '', string $domain = '', boolean $secure = false, boolean $HTTPOnly = false ) : void | Set the cookie |
Method | Description | |
---|---|---|
getCookieStr ( string $name ) : string | Get cookie by name | |
getSessionState ( ) : mixed | Get session state | |
setSessionState ( mixed $var ) : void | Set session state |
public __construct ( |
||
$client | Remote client | |
$appInstance |
protected getCookieStr ( string $name ) : string | ||
$name | string | Name of cookie |
return | string | Contents |
protected getSessionState ( ) : mixed | ||
return | mixed |
public gracefulShutdown ( ) : boolean | ||
return | boolean | Ready to shutdown? |
public handleException ( $e ) : boolean | ||
$e | ||
return | boolean | Handled? |
public onHandshake ( ) : void | ||
return | void |
protected setSessionState ( mixed $var ) : void | ||
$var | mixed | |
return | void |
public setcookie ( string $name, string $value = '', integer $maxage, string $path = '', string $domain = '', boolean $secure = false, boolean $HTTPOnly = false ) : void | ||
$name | string | Name of cookie |
$value | string | Value |
$maxage | integer | Optional. Max-Age. Default is 0. |
$path | string | Optional. Path. Default is empty string. |
$domain | string | Optional. Domain. Default is empty string. |
$secure | boolean | Optional. Secure. Default is false. |
$HTTPOnly | boolean | Optional. HTTPOnly. Default is false. |
return | void |
public AppInstance,PHPDaemon\Core $appInstance | ||
return |
public Connection,PHPDaemon\Servers\WebSocket $client | ||
return |