/** * @param boolean $nowait * @return array */ public function confirmSelect($nowait = false) { $writer = new AMQPWriter(); $writer->write_bits(array($nowait)); return array(85, 10, $writer); }
/** * @param string $virtual_host * @param string $capabilities * @param bool $insist * @return mixed */ protected function x_open($virtual_host, $capabilities = '', $insist = false) { $args = new AMQPWriter(); $args->write_shortstr($virtual_host); $args->write_shortstr($capabilities); $args->write_bits(array($insist)); $this->send_method_frame(array(10, 40), $args); $wait = array($this->waitHelper->get_wait('connection.open_ok')); if ($this->protocolVersion == '0.8') { $wait[] = $this->waitHelper->get_wait('connection.redirect'); } return $this->wait($wait); }
/** * @return array */ public function streamPublish($ticket = 1, $exchange = '', $routing_key = '', $mandatory = false, $immediate = false) { $args = new AMQPWriter(); $args->write_short($ticket); $args->write_shortstr($exchange); $args->write_shortstr($routing_key); $args->write_bits(array($mandatory, $immediate)); return array(80, 40, $args); }