3 #include "stg/sgcp_utils.h"
7 using STG::SGCP::Packet;
9 uint64_t Packet::MAGIC = 0x5f8edc0fdb6d3113; // Carefully picked random 64-bit number :)
10 uint16_t Packet::VERSION = 1;
12 Packet::Packet(uint16_t ver, uint16_t t, uint16_t sz)
14 senderTime(time(NULL)),
21 Packet hton(Packet value)
23 value.magic = hton(value.magic);
24 value.senderTime = hton(value.senderTime);
25 value.version = hton(value.version);
26 value.type = hton(value.type);
27 value.size = hton(value.size);