Skip to content

Commit 39c0f71

Browse files
authored
Optimized code. (#2652)
1 parent c3f4bd5 commit 39c0f71

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Client.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ public function recv(float $timeout = -1)
7171
}
7272

7373
/**
74-
* @param bool|int $finish TODO: When swoole version >= 4.4.12, `finish` is SWOOLE_WEBSOCKET_FLAG_FIN or SWOOLE_WEBSOCKET_FLAG_COMPRESS
74+
* @param int $flags SWOOLE_WEBSOCKET_FLAG_FIN or SWOOLE_WEBSOCKET_FLAG_COMPRESS
7575
*/
76-
public function push(string $data, int $opcode = WEBSOCKET_OPCODE_TEXT, $finish = null): bool
76+
public function push(string $data, int $opcode = WEBSOCKET_OPCODE_TEXT, int $flags = null): bool
7777
{
78-
if (isset($finish)) {
79-
return $this->client->push($data, $opcode, $finish);
78+
if (isset($flags)) {
79+
return $this->client->push($data, $opcode, $flags);
8080
}
8181
return $this->client->push($data, $opcode);
8282
}

0 commit comments

Comments
 (0)