diff --git a/src/APIConnector.php b/src/APIConnector.php index 9da509d..eed48b4 100644 --- a/src/APIConnector.php +++ b/src/APIConnector.php @@ -20,17 +20,26 @@ class APIConnector protected $stream; /** - * Constructor + * APIConnector constructor. * - * @param StreamInterface $stream + * @param \RouterOS\Interfaces\StreamInterface $stream */ - public function __construct(StreamInterface $stream) { $this->stream = $stream; } /** + * Close stream connection + * + * @return void + */ + public function close(): void + { + $this->stream->close(); + } + + /** * Reads a WORD from the stream * * WORDs are part of SENTENCE. Each WORD has to be encoded in certain way - length of the WORD followed by WORD content.