예제 #1
0
 function longWriteAndRead($v)
 {
     $w = new AMQPWriter();
     $w->write_long($v);
     $r = new AMQPReader($w->getvalue());
     $this->assertEqual($r->read_long(), $v);
 }
예제 #2
0
 /**
  * negotiate connection tuning parameters
  */
 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;
 }
예제 #3
0
 /**
  * specify quality of service
  */
 public function basic_qos($prefetch_size, $prefetch_count, $a_global)
 {
     $args = new AMQPWriter();
     $args->write_long($prefetch_size);
     $args->write_short($prefetch_count);
     $args->write_bit($a_global);
     $this->send_method_frame(array(60, 10), $args);
     return $this->wait(array("60,11"));
 }
예제 #4
0
 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;
 }