示例#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;
 }
示例#2
0
文件: Pool.php 项目: 0x20h/phloppy
 /**
  * @param string   $msg
  * @param int|null $len
  *
  * @return StreamInterface the Stream instance.
  */
 public function write($msg, $len = null)
 {
     $this->connected->write($msg, $len);
     return $this;
 }