Skip to content

Commit

Permalink
Update RFC6455.php
Browse files Browse the repository at this point in the history
Fix #288 Fix #287
  • Loading branch information
walkor authored Jun 16, 2023
1 parent fa07813 commit b89b3f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Engine/Protocols/WebSocket/RFC6455.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b89b3f2

Please sign in to comment.