Exemplo n.º 1
0
 public function testInteger($integer_1, $integer_2, $integer_3, $integer_4, $operation)
 {
     $args = new PhpAmqpLib_Wire_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);
 }
Exemplo n.º 2
0
 /**
  * Sends a heartbeat message
  */
 protected function write_heartbeat()
 {
     $pkt = new PhpAmqpLib_Wire_AMQPWriter();
     $pkt->write_octet(8);
     $pkt->write_short(0);
     $pkt->write_long(0);
     $pkt->write_octet(0xce);
     $this->write($pkt->getvalue());
 }
Exemplo n.º 3
0
 /**
  * @return array
  */
 public function basicQos($prefetch_size = 0, $prefetch_count = 0, $global = false)
 {
     $args = new PhpAmqpLib_Wire_AMQPWriter();
     $args->write_long($prefetch_size);
     $args->write_short($prefetch_count);
     $args->write_bits(array($global));
     return array(60, 10, $args);
 }
 /**
  * Negotiates connection tuning parameters
  *
  * @param $channel_max
  * @param $frame_max
  * @param $heartbeat
  */
 protected function x_tune_ok($channel_max, $frame_max, $heartbeat)
 {
     $args = new PhpAmqpLib_Wire_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;
 }