Renamed codec to protocol

This commit is contained in:
2024-02-22 01:22:52 +01:00
parent be6955ea48
commit b0aede55b9
3 changed files with 10 additions and 8 deletions

View File

@ -28,8 +28,8 @@ class WebSocketConnection implements WebSocketInterface
/** @var string|null The name of the group that this connection has joined, or null */
private ?string $groupName = null;
/** @var WebSocketCodec The frame encoder/decoder */
private WebSocketCodec $codec;
/** @var WebSocketProtocol The frame encoder/decoder */
private WebSocketProtocol $codec;
private ?ConnectionGroup $group = null;
@ -41,14 +41,16 @@ class WebSocketConnection implements WebSocketInterface
private ServerRequestInterface $request;
/** @var string|null Buffer for fragmented messages */
private ?string $buffer = null;
/** @var int|null The opcode of a fragmented message */
private ?int $bufferedOp = null;
public function __construct(ServerRequestInterface $request, ReadableStreamInterface $inStream, WritableStreamInterface $outStream, GroupManager $groupManager)
{
// The codec is used to encode and decode frames
$this->codec = new WebSocketCodec();
$this->codec = new WebSocketProtocol();
$this->request = $request;
$this->inStream = $inStream;