/**
  * Proposes connection tuning parameters
  *
  * @param AMQPReader $args
  */
 protected function connection_tune($args)
 {
     $v = $args->read_short();
     if ($v) {
         $this->channel_max = $v;
     }
     $v = $args->read_long();
     if ($v) {
         $this->frame_max = $v;
     }
     // use server proposed value if not set
     if ($this->heartbeat === null) {
         $this->heartbeat = $args->read_short();
     }
     $this->x_tune_ok($this->channel_max, $this->frame_max, $this->heartbeat);
 }
Beispiel #2
0
 /**
  * Provides client with a message
  *
  * @param AMQPReader $args
  * @param AMQPMessage $msg
  * @return AMQPMessage
  */
 protected function basic_get_ok($args, $msg)
 {
     $delivery_tag = $args->read_longlong();
     $redelivered = $args->read_bit();
     $exchange = $args->read_shortstr();
     $routing_key = $args->read_shortstr();
     $message_count = $args->read_long();
     $msg->delivery_info = array('delivery_tag' => $delivery_tag, 'redelivered' => $redelivered, 'exchange' => $exchange, 'routing_key' => $routing_key, 'message_count' => $message_count);
     return $msg;
 }
Beispiel #3
0
 /**
  * @param AMQPReader $reader
  * @return array
  */
 public static function basicGetOk(AMQPReader $reader)
 {
     $response = array();
     $response[] = $reader->read_longlong();
     $response[] = $reader->read_bit();
     $response[] = $reader->read_shortstr();
     $response[] = $reader->read_shortstr();
     $response[] = $reader->read_long();
     return $response;
 }
Beispiel #4
0
 /**
  * provide client with a message
  *
  * @param AMQPReader $args
  * @param AMQPMessage $msg
  * @return AMQPMessage
  */
 protected function basic_get_ok($args, $msg)
 {
     $delivery_tag = $args->read_longlong();
     $redelivered = $args->read_bit();
     $exchange = $args->read_shortstr();
     $routing_key = $args->read_shortstr();
     $message_count = $args->read_long();
     $msg->delivery_info = array("delivery_tag" => $delivery_tag, "redelivered" => $redelivered, "exchange" => $exchange, "routing_key" => $routing_key, "message_count" => $message_count);
     return $msg;
 }
Beispiel #5
0
 /**
  * @param AMQPReader $args
  * @return array
  */
 public static function testContentOk($args)
 {
     $ret = array();
     $ret[] = $args->read_long();
     return $ret;
 }
Beispiel #6
0
 /**
  * @param AMQPReader $reader
  * @return array
  */
 public static function testContentOk(AMQPReader $reader)
 {
     $response = array();
     $response[] = $reader->read_long();
     return $response;
 }
 /**
  * propose connection tuning parameters
  *
  * @param AMQPReader $args
  */
 protected function connection_tune($args)
 {
     $v = $args->read_short();
     if ($v) {
         $this->channel_max = $v;
     }
     $v = $args->read_long();
     if ($v) {
         $this->frame_max = $v;
     }
     $this->heartbeat = $args->read_short();
     $this->x_tune_ok($this->channel_max, $this->frame_max, 0);
 }
Beispiel #8
0
 /**
  * @param AMQPReader $args
  * @return array
  */
 public static function basicGetOk($args)
 {
     $ret = array();
     $ret[] = $args->read_longlong();
     $ret[] = $args->read_bit();
     $ret[] = $args->read_shortstr();
     $ret[] = $args->read_shortstr();
     $ret[] = $args->read_long();
     return $ret;
 }