1 #ifndef _ots_TCPPacket_h_
2 #define _ots_TCPPacket_h_
15 static std::string encode(
char const* message, std::size_t length);
16 static std::string encode(
const std::string& message);
18 bool decode(std::string& message);
26 this->fBuffer += buffer;
33 out << packet.fBuffer;
39 static constexpr uint32_t headerLength = 4;
void reset(void)
Resets the storage buffer.
friend std::ostream & operator<<(std::ostream &out, const TCPPacket &packet)
TCPPacket & operator+=(const std::string &buffer)
Operator overload.