amphp (#11)
This commit is contained in:
38
src/Stream/GzipStream.php
Normal file
38
src/Stream/GzipStream.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Nsq\Stream;
|
||||
|
||||
use Amp\Promise;
|
||||
use Nsq\Exception\NsqException;
|
||||
use Nsq\Stream;
|
||||
|
||||
class GzipStream implements Stream
|
||||
{
|
||||
public function __construct(private Stream $stream)
|
||||
{
|
||||
throw new NsqException('GzipStream not implemented yet.');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function read(): Promise
|
||||
{
|
||||
return $this->stream->read();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function write(string $data): Promise
|
||||
{
|
||||
return $this->stream->write($data);
|
||||
}
|
||||
|
||||
public function close(): void
|
||||
{
|
||||
$this->stream->close();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user