PHP Class PHPDaemon\Servers\WebSocket\Protocols\V13

See also: http://datatracker.ietf.org/doc/rfc6455/?include_text=1
Inheritance: extends PHPDaemon\Servers\WebSocket\Connection
Datei anzeigen Open project: kakserpom/phpdaemon

Protected Properties

Property Type Description
$framebuf
$opcodes
$outgoingCompression

Public Methods

Method Description
mask ( $data, string | false $mask ) : mixed Apply mask
onRead ( ) : void Called when new data received
sendFrame ( string $data, string $type = null, callable $cb = null ) : boolean Sends a frame.
sendHandshakeReply ( $extraHeaders = '' ) : boolean Sends a handshake message reply

Method Details

mask() public method

Apply mask
public mask ( $data, string | false $mask ) : mixed
$data
$mask string | false
return mixed

onRead() public method

Called when new data received
See also: http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10#page-16
public onRead ( ) : void
return void

sendFrame() public method

Sends a frame.
public sendFrame ( string $data, string $type = null, callable $cb = null ) : boolean
$data string Frame's data.
$type string Frame's type. ("STRING" OR "BINARY")
$cb callable Optional. Callback called when the frame is received by client.
return boolean Success.

sendHandshakeReply() public method

Sends a handshake message reply
public sendHandshakeReply ( $extraHeaders = '' ) : boolean
return boolean OK?

Property Details

$framebuf protected_oe property

protected $framebuf

$opcodes protected_oe static_oe property

protected static $opcodes

$outgoingCompression protected_oe property

protected $outgoingCompression