Example #1
0
 /**
  * Send request and retrieve response to the connected disque node.
  *
  * @param array $args
  * @return array|int|null|string
  *
  * @throws CommandException
  * @throws StreamException
  */
 protected function send(array $args = [])
 {
     $this->log->debug('send()ing command', $args);
     $response = RespUtils::deserialize($this->stream->write(RespUtils::serialize($args)));
     $this->log->debug('response', [$response]);
     return $response;
 }