From b89b3f2ed44f6f79fd9895e2d198b52b3fb4783b Mon Sep 17 00:00:00 2001 From: walkor Date: Fri, 16 Jun 2023 09:41:34 +0800 Subject: [PATCH] Update RFC6455.php Fix #288 Fix #287 --- src/Engine/Protocols/WebSocket/RFC6455.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Engine/Protocols/WebSocket/RFC6455.php b/src/Engine/Protocols/WebSocket/RFC6455.php index ed652d2..afca7d2 100644 --- a/src/Engine/Protocols/WebSocket/RFC6455.php +++ b/src/Engine/Protocols/WebSocket/RFC6455.php @@ -44,7 +44,7 @@ class RFC6455 implements \Workerman\Protocols\ProtocolInterface * 检查包的完整性 * @param string $buffer */ - public static function input(string $buffer, ConnectionInterface $connection): bool|int + public static function input($buffer, ConnectionInterface $connection) { // 数据长度 $recv_len = strlen($buffer); @@ -173,7 +173,7 @@ public static function input(string $buffer, ConnectionInterface $connection): b * @param string $buffer * @return string */ - public static function encode(mixed $buffer, ConnectionInterface $connection): string + public static function encode($buffer, ConnectionInterface $connection) { $len = strlen($buffer); if (empty($connection->websocketHandshake)) { @@ -210,7 +210,7 @@ public static function encode(mixed $buffer, ConnectionInterface $connection): s * @param string $buffer * @return string */ - public static function decode(string $buffer, ConnectionInterface $connection): mixed + public static function decode($buffer, ConnectionInterface $connection) { $len = $masks = $data = $decoded = null; $len = ord($buffer[1]) & 127;