Свойство | Type | Description | |
---|---|---|---|
$appInstance | |||
$attrs | |||
$client |
Свойство | Type | Description | |
---|---|---|---|
$running |
Méthode | 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 |
Méthode | 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 |
Résultat | string | Contents |
protected getSessionState ( ) : mixed | ||
Résultat | mixed |
public gracefulShutdown ( ) : boolean | ||
Résultat | boolean | Ready to shutdown? |
public handleException ( $e ) : boolean | ||
$e | ||
Résultat | boolean | Handled? |
public onHandshake ( ) : void | ||
Résultat | void |
protected setSessionState ( mixed $var ) : void | ||
$var | mixed | |
Résultat | 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. |
Résultat | void |
public AppInstance,PHPDaemon\Core $appInstance | ||
Résultat |
public Connection,PHPDaemon\Servers\WebSocket $client | ||
Résultat |