From 60f83aa7569198bc653a3837043668c612099462 Mon Sep 17 00:00:00 2001 From: Paul Rock Date: Wed, 1 Jul 2020 22:05:34 +0300 Subject: [PATCH] close method added to APIConnector class --- src/APIConnector.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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.