input() input(string $buffer, \Workerman\Connection\ConnectionInterface $connection) : int Check the integrity of the package. Parameters string $buffer \Workerman\Connection\ConnectionInterface $connection Returns int —
encode() encode(mixed $payload, \Workerman\Connection\ConnectionInterface $connection) : string Websocket encode. Parameters mixed $payload \Workerman\Connection\ConnectionInterface $connection Returns string —
decode() decode(mixed $bytes, \Workerman\Connection\ConnectionInterface $connection) : string Websocket decode. Parameters mixed $bytes \Workerman\Connection\ConnectionInterface $connection Returns string —
onConnect() onConnect(mixed $connection) : void Send websocket handshake data. Parameters mixed $connection
onClose() onClose(\Workerman\Connection\TcpConnection $connection) : mixed Clean Parameters \Workerman\Connection\TcpConnection $connection Returns mixed —
sendHandshake() sendHandshake(\Workerman\Connection\TcpConnection $connection) : void Send websocket handshake. Parameters \Workerman\Connection\TcpConnection $connection
dealHandshake() dealHandshake(string $buffer, \Workerman\Connection\TcpConnection $connection) : int Websocket handshake. Parameters string $buffer \Workerman\Connection\TcpConnection $connection Returns int —
WSSetProtocol() WSSetProtocol(mixed $connection, mixed $params) : mixed Parameters mixed $connection mixed $params Returns mixed —
WSGetServerProtocol() WSGetServerProtocol(mixed $connection) : mixed Parameters mixed $connection Returns mixed —