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 header_v0
00033 };
00034
00035 MessType message_type;
00036 int64_t source_id;
00037
00038 union
00039 {
00040 uint32_t conn_magic;
00041 int32_t byte_count;
00042 };
00043 };
00044
00048 #define CONN_MAGIC 0xcafefeca
00049 #define ACK_MAGIC 0xbeeffeed
00050 #endif // SRSockets_hh