82 #ifndef TRM_TRANSPORT_HEADER_H_
83 #define TRM_TRANSPORT_HEADER_H_
97 static const size_t kHeaderLength = 16;
100 Header(MessageType type,
int connectionId,
size_t payloadLength);
101 void serialize(std::vector<uint8_t> &out)
const;
102 void deserialize(
const std::vector<uint8_t> &in);
103 void setPayloadLength(
size_t payloadLength);
104 size_t getPayloadLength(
void)
const;
105 void setClientId(uint32_t connectionId);
106 uint32_t getClientId(
void)
const;
108 void print(
void)
const {
109 printf(
"payloadLength =0x%0X\r\n", payloadLength);
112 static uint32_t messageIndex;
116 static const char kProtocol[4];
119 uint32_t payloadLength;