function longWriteAndRead($v) { $w = new AMQPWriter(); $w->write_long($v); $r = new AMQPReader($w->getvalue()); $this->assertEqual($r->read_long(), $v); }
/** * 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; }
/** * 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")); }
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; }