Struct amqp_frame_t

Synopsis

#include <librabbitmq/amqp.h>

typedef struct amqp_frame_t_

Description

An AMQP frame

Since
v0.1

Mentioned in

Source

Lines 603-630 in librabbitmq/amqp.h.

typedef struct amqp_frame_t_ {
  uint8_t frame_type;     /**< frame type. The types:
                           * - AMQP_FRAME_METHOD - use the method union member
                           * - AMQP_FRAME_HEADER - use the properties union member
                           * - AMQP_FRAME_BODY - use the body_fragment union member
                           */
  amqp_channel_t channel; /**< the channel the frame was received on */
  union {
    amqp_method_t
        method; /**< a method, use if frame_type == AMQP_FRAME_METHOD */
    struct {
      uint16_t class_id;        /**< the class for the properties */
      uint64_t body_size;       /**< size of the body in bytes */
      void *decoded;            /**< the decoded properties */
      amqp_bytes_t raw;         /**< amqp-encoded properties structure */
    } properties;               /**< message header, a.k.a., properties,
                                      use if frame_type == AMQP_FRAME_HEADER */
    amqp_bytes_t body_fragment; /**< a body fragment, use if frame_type ==
                                   AMQP_FRAME_BODY */
    struct {
      uint8_t transport_high;         /**< @internal first byte of handshake */
      uint8_t transport_low;          /**< @internal second byte of handshake */
      uint8_t protocol_version_major; /**< @internal third byte of handshake */
      uint8_t protocol_version_minor; /**< @internal fourth byte of handshake */
    } protocol_header; /**< Used only when doing the initial handshake with the
                          broker, don't use otherwise */
  } payload;           /**< the payload of the frame */
} amqp_frame_t;





Add Discussion as Guest

Log in to DocsForge