PHP Class PHPDaemon\Clients\WebSocket\Connection

Author: Kozin Denis ([email protected])
Author: Vasily Zorin ([email protected])
Inheritance: extends PHPDaemon\Network\ClientConnection
Datei anzeigen Open project: kakserpom/phpdaemon

Public Properties

Property Type Description
$headers array
$type string

Protected Properties

Property Type Description
$isMasked string
$key string
$opCodes array
$pctLength integer
$state integer

Public Methods

Method Description
onFinish ( ) : void
onRead ( ) : void Called when new data received
onReady ( ) : void Called when the connection is handshaked (at low-level), and peer is ready to recv. data
sendFrame ( string $payload, string $type = Pool::TYPE_TEXT, boolean $isMasked = true ) Send frame to WebSocket server

Protected Methods

Method Description
mask ( string $mask, string $str ) : string

Method Details

mask() protected static method

protected static mask ( string $mask, string $str ) : string
$mask string
$str string
return string

onFinish() public method

public onFinish ( ) : void
return void

onRead() public method

Called when new data received
public onRead ( ) : void
return void

onReady() public method

Called when the connection is handshaked (at low-level), and peer is ready to recv. data
public onReady ( ) : void
return void

sendFrame() public method

Send frame to WebSocket server
public sendFrame ( string $payload, string $type = Pool::TYPE_TEXT, boolean $isMasked = true )
$payload string
$type string
$isMasked boolean

Property Details

$headers public_oe property

public array $headers
return array

$isMasked protected_oe property

protected string $isMasked
return string

$key protected_oe property

protected string $key
return string

$opCodes protected_oe property

protected array $opCodes
return array

$pctLength protected_oe property

protected int $pctLength
return integer

$state protected_oe property

protected int $state
return integer

$type public_oe property

public string $type
return string