\ProtocolTCPProtocol

TCP协议

Summary

Methods
Properties
Constants
build()
send()
verify()
corrective()
parse()
cut()
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

build()

build(string  $context) : string

报文打包

Parameters

string $context

Returns

string —

send()

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

通过协议发送

Parameters

\Core\Std\TunnelStd $tunnel
string $context

Returns

bool|int —

verify()

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

报文验证

Parameters

string $context
\stdClass|null $Standard

Returns

string|false —

corrective()

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

抛弃脏数据,调整通道指针

Parameters

\Core\Std\TunnelStd $tunnel

Returns

string|false —

parse()

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

解析报文

Parameters

\Worker\Socket\TCPConnection $tunnel

Returns

string|false|null —

cut()

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

报文切片

Parameters

\Core\Std\TunnelStd $tunnel

Returns

string|false —

handshake()

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

握手

Parameters

\Worker\Socket\TCPConnection $client

Returns

bool|null —