00001 #ifndef PROTON_FRAMING_H
00002 #define PROTON_FRAMING_H 1
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include <proton/import_export.h>
00026 #include <proton/type_compat.h>
00027 #include <sys/types.h>
00028
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032
00033 #define AMQP_HEADER_SIZE (8)
00034 #define AMQP_MIN_MAX_FRAME_SIZE ((uint32_t)512) // minimum allowable max-frame
00035
00036 typedef struct {
00037 uint8_t type;
00038 uint16_t channel;
00039 size_t ex_size;
00040 const char *extended;
00041 size_t size;
00042 const char *payload;
00043 } pn_frame_t;
00044
00045 PN_EXTERN size_t pn_read_frame(pn_frame_t *frame, const char *bytes, size_t available);
00046 PN_EXTERN size_t pn_write_frame(char *bytes, size_t size, pn_frame_t frame);
00047
00048 #ifdef __cplusplus
00049 }
00050 #endif
00051
00052 #endif