Свойство | Тип | Описание | |
---|---|---|---|
$appInstance | |||
$attrs | |||
$client |
Свойство | Тип | Описание | |
---|---|---|---|
$running |
Метод | Описание | |
---|---|---|
__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 |
Метод | Описание | |
---|---|---|
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 |
Результат | string | Contents |
protected getSessionState ( ) : mixed | ||
Результат | mixed |
public gracefulShutdown ( ) : boolean | ||
Результат | boolean | Ready to shutdown? |
public handleException ( $e ) : boolean | ||
$e | ||
Результат | boolean | Handled? |
public onHandshake ( ) : void | ||
Результат | void |
protected setSessionState ( mixed $var ) : void | ||
$var | mixed | |
Результат | 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. |
Результат | void |
public AppInstance,PHPDaemon\Core $appInstance | ||
Результат |
public Connection,PHPDaemon\Servers\WebSocket $client | ||
Результат |