\Worker\SocketTCPConnection

客户端

Summary

Methods
Properties
Constants
__construct()
handshake()
getPlaintext()
cache()
cleanCache()
send()
readToCache()
$verifyBuffer
$socketType
$verify
$cache
$info
$protocol
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$verifyBuffer

$verifyBuffer : string

Type

string

$socketType

$socketType : string

Type

string

$verify

$verify : bool

Type

bool

$cache

$cache : string

Type

string

$info

$info : mixed

Type

mixed

$protocol

$protocol : \Core\Std\ProtocolStd

Type

ProtocolStd

Methods

__construct()

__construct(mixed  $socket, string  $type) : mixed

Parameters

mixed $socket
string $type

Returns

mixed —

handshake()

handshake(\Core\Std\ProtocolStd  $protocol) : true

设置协议

Parameters

\Core\Std\ProtocolStd $protocol

Returns

true —

getPlaintext()

getPlaintext() : string|false|null

通过协议切割

Returns

string|false|null —

cache()

cache(string|null  $context = null) : string

客户端数据缓存区

Parameters

string|null $context

Returns

string —

cleanCache()

cleanCache() : string

清空缓存区

Returns

string —

send()

send(string  $context) : bool|int

发送信息

Parameters

string $context

Returns

bool|int —

readToCache()

readToCache() : int|false

读取到缓冲区

Returns

int|false —