示例#1
0
 /**
  * Negotiates connection tuning parameters
  *
  * @param $channel_max
  * @param $frame_max
  * @param $heartbeat
  */
 protected function x_tune_ok($channel_max, $frame_max, $heartbeat)
 {
     $args = new AMQPWriter();
     $args->write_short($channel_max);
     $args->write_long($frame_max);
     $args->write_short($heartbeat);
     $this->send_method_frame(array(10, 31), $args);
     $this->wait_tune_ok = false;
 }
示例#2
0
 /**
  * @param integer $prefetch_size
  * @param integer $prefetch_count
  * @param boolean $global
  * @return array
  */
 public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false)
 {
     $writer = new AMQPWriter();
     $writer->write_long($prefetch_size);
     $writer->write_short($prefetch_count);
     $writer->write_bits(array($global));
     return array(60, 10, $writer);
 }
示例#3
0
 /**
  * Sends a heartbeat message
  */
 protected function write_heartbeat()
 {
     $pkt = new AMQPWriter();
     $pkt->write_octet(8);
     $pkt->write_short(0);
     $pkt->write_long(0);
     $pkt->write_octet(0xce);
     $this->write($pkt->getvalue());
 }
示例#4
0
 public function testInteger($integer_1, $integer_2, $integer_3, $integer_4, $operation)
 {
     $args = new AMQPWriter();
     $args->write_octet($integer_1);
     $args->write_short($integer_2);
     $args->write_long($integer_3);
     $args->write_longlong($integer_4);
     $args->write_octet($operation);
     return array(120, 10, $args);
 }
示例#5
0
 public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false)
 {
     $args = new AMQPWriter();
     $args->write_long($prefetch_size);
     $args->write_short($prefetch_count);
     $args->write_bit($global);
     return array(60, 10, $args);
 }
 public function basicQos($prefetch_size, $prefetch_count, $a_global)
 {
     $args = new AMQPWriter();
     $args->write_long($prefetch_size)->write_short($prefetch_count)->write_bit($a_global);
     return $args;
 }