Implemented writeAll and closeAll for groups
This commit is contained in:
@ -252,8 +252,17 @@ class WebSocketConnection implements WebSocketInterface
|
||||
*/
|
||||
public function close()
|
||||
{
|
||||
// TODO send close
|
||||
$this->outStream->close();
|
||||
$this->inStream->close();
|
||||
// TODO emit close event
|
||||
}
|
||||
|
||||
public function closeWithReason(string $reason, int $code=1000)
|
||||
{
|
||||
// TODO send close
|
||||
$payload = chr(($code >> 8) & 0xFF) . chr($code & 0xFF) . $reason;
|
||||
$this->send(self::OP_CLOSE, $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user