00001 #ifndef SRSockets_hh
00002 #define SRSockets_hh
00003 #include <cstdint>
00004
00005
00006
00007
00008
00009
00010
00011
00015 struct MessHead
00016 {
00017 uint8_t endian;
00018
00024 enum MessType
00025 {
00026 connect_v0 = 0,
00027 data_v0,
00028 data_more_v0,
00029 stop_v0,
00030 routing_v0,
00031 ack_v0
00032 };
00033
00034 MessType message_type;
00035 int64_t source_id;
00036
00037 union
00038 {
00039 uint32_t conn_magic;
00040 int32_t byte_count;
00041 };
00042 };
00043
00047 #define CONN_MAGIC 0xcafefeca
00048 #define ACK_MAGIC 0xbeeffeed
00049 #endif // SRSockets_hh