Wrap Socket

This commit is contained in:
2021-01-30 20:07:28 +03:00
parent e3485416a5
commit 72dca5c73b
10 changed files with 288 additions and 214 deletions

View File

@@ -5,7 +5,6 @@ declare(strict_types=1);
namespace Nsq;
use PHPinnacle\Buffer\ByteBuffer;
use const PHP_EOL;
final class Buffer
{
@@ -23,17 +22,6 @@ final class Buffer
return $this;
}
public function appendCommand(string $command): void
{
$this->buffer->append($command.PHP_EOL);
}
public function appendData(string $data): void
{
$this->buffer->appendUint32(\strlen($data));
$this->buffer->append($data);
}
public function consumeSize(): int
{
/** @see Bytes::BYTES_SIZE */