\Support\WebSocketWebSocket

Websocket协议

Summary

Methods
Properties
Constants
send()
build()
verify()
cut()
parse()
corrective()
handshake()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

send()

send(\Core\Std\TunnelStd  $tunnel, string  $context) : bool

SEND VIA INTERFACE

Parameters

\Core\Std\TunnelStd $tunnel
string $context

Returns

bool —

build()

build(string  $context, int  $opcode = 0x1, bool  $fin = true) : string

PACKET PACKING

Parameters

string $context

MESSAGE SPECIFIC

int $opcode
bool $fin

Returns

string —

TAKE CHARGE OF

verify()

verify(string  $context, \stdClass|null  $Standard = null) : string|false

MESSAGE VERIFICATION

Parameters

string $context

MESSAGE

\stdClass|null $Standard

Additional parameters

Returns

string|false —

Validation results

cut()

cut(\Core\Std\TunnelStd  $tunnel) : string|false|null

报文切片

Parameters

\Core\Std\TunnelStd $tunnel

ANY CHANNEL

Returns

string|false|null —

SLICE RESULT

parse()

parse(\Worker\Socket\TCPConnection  $tunnel) : string|false|null

解析报文

Parameters

\Worker\Socket\TCPConnection $tunnel

Returns

string|false|null —

corrective()

corrective(\Core\Std\TunnelStd  $tunnel) : string|false

Adjustment not supported

Parameters

\Core\Std\TunnelStd $tunnel

Returns

string|false —

handshake()

handshake(\Worker\Socket\TCPConnection  $client) : bool|null

请求握手

Parameters

\Worker\Socket\TCPConnection $client

Returns

bool|null —