BINARY_TYPE_BLOB
BINARY_TYPE_BLOB = "\x81" : string
Websocket blob type.
WebSocket protocol.
input(string $buffer, \Workerman\Connection\ConnectionInterface $connection) : integer
Check the integrity of the package.
Please return the length of package. If length is unknow please return 0 that mean wating more data. If the package has something wrong please return false the connection will be closed.
string | $buffer | |
\Workerman\Connection\ConnectionInterface | $connection |
encode(string $buffer, \Workerman\Connection\ConnectionInterface $connection) : string
Websocket encode.
string | $buffer | |
\Workerman\Connection\ConnectionInterface | $connection |
decode(string $buffer, \Workerman\Connection\ConnectionInterface $connection) : string
Websocket decode.
string | $buffer | |
\Workerman\Connection\ConnectionInterface | $connection |
dealHandshake(string $buffer, \Workerman\Connection\TcpConnection $connection) : integer
Websocket handshake.
string | $buffer | |
\Workerman\Connection\TcpConnection | $connection |