Explode Response to Frames

This commit is contained in:
2021-01-30 17:14:19 +03:00
parent fc6b67cc92
commit f74b82a400
24 changed files with 367 additions and 148 deletions

View File

@@ -15,7 +15,7 @@ final class Producer extends Connection
*/
public function pub(string $topic, string $body): void
{
$this->command('PUB', $topic, $body)->response()->okOrFail();
$this->command('PUB', $topic, $body)->checkIsOK();
}
/**
@@ -31,7 +31,7 @@ final class Producer extends Connection
return pack('N', \strlen($body)).$body;
}, $bodies));
$this->command('MPUB', $topic, $num.$mb)->response()->okOrFail();
$this->command('MPUB', $topic, $num.$mb)->checkIsOK();
}
/**
@@ -39,6 +39,6 @@ final class Producer extends Connection
*/
public function dpub(string $topic, string $body, int $delay): void
{
$this->command('DPUB', [$topic, $delay], $body)->response()->okOrFail();
$this->command('DPUB', [$topic, $delay], $body)->checkIsOK();
}
}