From e1cdd30c933be7f87d2492b92de3ca6806f4261b Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 16 Nov 2014 16:00:03 +0100 Subject: [PATCH] Livestatus\Connection: fetch row from socket... ...basically just calling readLine, but splitting columns --- library/Icinga/Protocol/Livestatus/Connection.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/library/Icinga/Protocol/Livestatus/Connection.php b/library/Icinga/Protocol/Livestatus/Connection.php index d470ff640..e736ee1d2 100644 --- a/library/Icinga/Protocol/Livestatus/Connection.php +++ b/library/Icinga/Protocol/Livestatus/Connection.php @@ -257,6 +257,15 @@ class Connection } } + public function fetchRowFromSocket() + { + $line = $this->readLineFromSocket(); + if (! $line) { + return false; + } + return $this->splitLine($line); + } + protected function readLineFromSocket() { if ($this->bytesRead === $this->responseSize) {