public function send_content($channel, $class_id, $weight, $body_size, $packed_properties, $body)
 {
     $pkt = new AMQPWriter();
     $pkt->write_octet(2);
     $pkt->write_short($channel);
     $pkt->write_long(strlen($packed_properties) + 12);
     $pkt->write_short($class_id);
     $pkt->write_short($weight);
     $pkt->write_longlong($body_size);
     $pkt->write($packed_properties);
     $pkt->write_octet(0xce);
     $pkt = $pkt->getvalue();
     $this->write($pkt);
     while ($body) {
         $payload = substr($body, 0, $this->frame_max - 8);
         $body = substr($body, $this->frame_max - 8);
         $pkt = new AMQPWriter();
         $pkt->write_octet(3);
         $pkt->write_short($channel);
         $pkt->write_long(strlen($payload));
         $pkt->write($payload);
         $pkt->write_octet(0xce);
         $pkt = $pkt->getvalue();
         $this->write($pkt);
     }
 }
 public function basicNack($delivery_tag = 0, $multiple = false, $requeue = true)
 {
     $args = new AMQPWriter();
     $args->write_longlong($delivery_tag);
     $args->write_bit($multiple);
     $args->write_bit($requeue);
     return array(60, 120, $args);
 }
 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);
 }