protected function _recvLn() { $lastline = rtrim($this->_sock->gets(8192)); $this->_debug("S: {$lastline}"); if ($lastline === '') { throw new Exception('Failed to read from socket'); } return $lastline; }