Browse Source

close method added to APIConnector class

pull/40/head
Paul Rock 6 years ago
parent
commit
60f83aa756
  1. 15
      src/APIConnector.php

15
src/APIConnector.php

@ -20,17 +20,26 @@ class APIConnector
protected $stream; protected $stream;
/** /**
* Constructor
* APIConnector constructor.
* *
* @param StreamInterface $stream
* @param \RouterOS\Interfaces\StreamInterface $stream
*/ */
public function __construct(StreamInterface $stream) public function __construct(StreamInterface $stream)
{ {
$this->stream = $stream; $this->stream = $stream;
} }
/** /**
* Close stream connection
*
* @return void
*/
public function close(): void
{
$this->stream->close();
}
/**
* Reads a WORD from the stream * 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. * WORDs are part of SENTENCE. Each WORD has to be encoded in certain way - length of the WORD followed by WORD content.

Loading…
Cancel
Save