PHP Class PHPDaemon\SockJS\WebSocketConnectionProxy

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

Protected Properties

Property Type Description
$realConn
$sockjs

Public Methods

Method Description
__call ( string $method, array $args ) : mixed __call
__construct ( Application $sockjs, object $conn ) __construct
__get ( string $k ) : mixed __get
__isset ( string $k ) : boolean __isset
__set ( string $k, $v ) : mixed __set * @param string $k Key * @param mixed $$v Value
onFrame ( string $data, string $type ) : boolean Called when new frame received.
sendFrame ( string $data, integer $type = null, callback $cb = null ) : boolean Sends a frame.
sendFrameReal ( string $data, integer $type = null, callback $cb = null ) : boolean Sends a frame.
toJson ( string $p ) : string toJson

Method Details

__call() public method

__call
public __call ( string $method, array $args ) : mixed
$method string
$args array
return mixed

__construct() public method

__construct
public __construct ( Application $sockjs, object $conn )
$sockjs Application
$conn object

__get() public method

__get
public __get ( string $k ) : mixed
$k string
return mixed

__isset() public method

__isset
public __isset ( string $k ) : boolean
$k string
return boolean

__set() public method

__set * @param string $k Key * @param mixed $$v Value
public __set ( string $k, $v ) : mixed
$k string
return mixed

onFrame() public method

Called when new frame received.
public onFrame ( string $data, string $type ) : boolean
$data string Frame's data.
$type string Frame's type ("STRING" OR "BINARY").
return boolean Success.

sendFrame() public method

Sends a frame.
public sendFrame ( string $data, integer $type = null, 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.

sendFrameReal() public method

Sends a frame.
public sendFrameReal ( string $data, integer $type = null, 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.

toJson() public method

toJson
public toJson ( string $p ) : string
$p string
return string

Property Details

$realConn protected_oe property

protected $realConn

$sockjs protected_oe property

protected $sockjs