1 #ifndef _ots_TCPPacket_h_
2 #define _ots_TCPPacket_h_
14 static std::string encode(
char const* message, std::size_t length);
15 static std::string encode(
const std::string& message);
17 bool decode (std::string& message);
23 TCPPacket& operator+=(
const std::string& buffer)
25 this->fBuffer += buffer;
29 friend std::ostream& operator<<(std::ostream& out,
const TCPPacket& packet)
32 out << packet.fBuffer;
38 static constexpr uint32_t headerLength = 4;