PHP Class PHPDaemon\SockJS\Session

Author: Vasily Zorin ([email protected])
Inheritance: use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Datei anzeigen Open project: kakserpom/phpdaemon

Public Properties

Property Type Description
$addr
$appInstance
$buffer array
$cookie
$finished boolean
$flushing boolean
$framesBuffer
$get
$id
$onWrite PHPDaemon\Structures\StackCallbacks
$post
$route PHPDaemon\Request\Generic
$server
$timeout integer

Protected Properties

Property Type Description
$finishTimer
$onFinishedCalled
$pollMode
$running

Public Methods

Method Description
__construct ( Application $appInstance, string $id, array $server ) : void __construct
c2s ( object $redis ) : void c2s
finish ( ) : void
flush ( ) : void Flushes buffered packets
handleException ( object $e ) : boolean | null Uncaught exception handler
onFinish ( ) : void
onFrame ( string $msg, integer $type ) : void onFrame
onHandshake ( ) : void onHandshake
onWrite ( ) : void
poll ( object $redis ) : void poll
sendFrame ( string $data, integer $type, callback $cb = null ) : boolean Sends a frame.
sendPacket ( object $pct, callable $cb = null ) : void sendPacket

Protected Methods

Method Description
toJson ( string $m ) : string toJson

Method Details

__construct() public method

__construct
public __construct ( Application $appInstance, string $id, array $server ) : void
$appInstance Application [@todo description]
$id string [@todo description]
$server array [@todo description]
return void

c2s() public method

c2s
public c2s ( object $redis ) : void
$redis object
return void

finish() public method

public finish ( ) : void
return void

flush() public method

Flushes buffered packets
public flush ( ) : void
return void

handleException() public method

Uncaught exception handler
public handleException ( object $e ) : boolean | null
$e object
return boolean | null Handled?

onFinish() public method

public onFinish ( ) : void
return void

onFrame() public method

onFrame
public onFrame ( string $msg, integer $type ) : void
$msg string [@todo description]
$type integer [@todo description]
return void

onHandshake() public method

onHandshake
public onHandshake ( ) : void
return void

onWrite() public method

public onWrite ( ) : void
return void

poll() public method

poll
public poll ( object $redis ) : void
$redis object
return void

sendFrame() public method

Sends a frame.
public sendFrame ( string $data, integer $type, callback $cb = null ) : boolean
$data string Frame's data.
$type integer Frame's type. See the constants.
$cb callback Optional. Callback called when the frame is received by client.
return boolean Success.

sendPacket() public method

sendPacket
public sendPacket ( object $pct, callable $cb = null ) : void
$pct object [@todo description]
$cb callable [@todo description]
return void

toJson() protected method

toJson
protected toJson ( string $m ) : string
$m string
return string

Property Details

$addr public_oe property

public $addr

$appInstance public_oe property

public $appInstance

$buffer public_oe property

public array $buffer
return array

$finishTimer protected_oe property

protected $finishTimer

$finished public_oe property

public bool $finished
return boolean

$flushing public_oe property

public bool $flushing
return boolean

$framesBuffer public_oe property

public $framesBuffer

$get public_oe property

public $get

$id public_oe property

public $id

$onFinishedCalled protected_oe property

protected $onFinishedCalled

$onWrite public_oe property

public StackCallbacks,PHPDaemon\Structures $onWrite
return PHPDaemon\Structures\StackCallbacks

$pollMode protected_oe property

protected $pollMode

$post public_oe property

public $post

$route public_oe property

public Generic,PHPDaemon\Request $route
return PHPDaemon\Request\Generic

$running protected_oe property

protected $running

$server public_oe property

public $server

$timeout public_oe property

public int $timeout
return integer