Skip to content

Commit

Permalink
Update for WebsocketCloseInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Sep 3, 2023
1 parent 5e6c5e9 commit e4bb518
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/Rfc6455Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Amp\Socket\TlsInfo;
use Amp\Websocket\Rfc6455Client;
use Amp\Websocket\WebsocketCloseCode;
use Amp\Websocket\WebsocketCloseInfo;
use Amp\Websocket\WebsocketCount;
use Amp\Websocket\WebsocketMessage;
use Amp\Websocket\WebsocketTimestamp;
Expand Down Expand Up @@ -63,19 +64,9 @@ public function getTlsInfo(): ?TlsInfo
return $this->client->getTlsInfo();
}

public function isClosedByPeer(): ?bool
public function getCloseInfo(): WebsocketCloseInfo
{
return $this->client->isClosedByPeer();
}

public function getCloseCode(): ?int
{
return $this->client->getCloseCode();
}

public function getCloseReason(): ?string
{
return $this->client->getCloseReason();
return $this->client->getCloseInfo();
}

public function sendText(string $data): void
Expand Down Expand Up @@ -108,7 +99,7 @@ public function getCount(WebsocketCount $type): int
return $this->client->getCount($type);
}

public function getTimestamp(WebsocketTimestamp $type): int
public function getTimestamp(WebsocketTimestamp $type): float
{
return $this->client->getTimestamp($type);
}
Expand Down

0 comments on commit e4bb518

Please sign in to comment.