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 };
00032
00033 MessType message_type;
00034 int64_t source_id;
00035
00036 union
00037 {
00038 uint32_t conn_magic;
00039 int32_t byte_count;
00040 };
00041 };
00042
00046 #define CONN_MAGIC 0xcafefeca
00047 #endif // SRSockets_hh