17 #ifndef KAATCPPARSER_HPP_
18 #define KAATCPPARSER_HPP_
21 #include <boost/noncopyable.hpp>
22 #include <boost/shared_array.hpp>
29 typedef std::pair<KaaTcpMessageType, std::pair<boost::shared_array<char>, std::uint32_t>>
MessageRecord;
47 void parseBuffer(
const char *buffer, std::uint32_t size);
58 void processByte(
char byte);
59 void retrieveMessageType(
char byte);
65 std::uint32_t messageLength_;
66 std::uint32_t processedPayloadLength_;
67 std::uint32_t lenghtMultiplier_;
69 boost::shared_array<char> messagePayload_;
std::pair< KaaTcpMessageType, std::pair< boost::shared_array< char >, std::uint32_t > > MessageRecord
KaaTcpParser(IKaaClientContext &context)
MessageRecordList releaseMessages()
boost::shared_array< char > getCurrentPayload() const
std::uint32_t getCurrentPayloadLength() const
std::list< MessageRecord > MessageRecordList
KaaTcpMessageType getCurrentMessageType() const
void parseBuffer(const char *buffer, std::uint32_t size)