/** * @return \Beanie\Command\Response */ public function invoke() { $responseLine = $this->socket->readLine(Server::EOL); return $this->responseParser->parseResponse(substr($responseLine, 0, strlen($responseLine) - Server::EOL_LENGTH), $this->server); }
protected function ensureConnected() { if (!$this->socket->isConnected()) { $this->connect(); } }