29 void processNewData(
const std::string &msg);
31 bool hasPackets()
const;
33 std::string nextPacket();
35 static std::string frameMsg(
const std::string &msg);
39 static uint32_t readPacketSize(
const std::string &msg, uint32_t next_offset);
42 uint32_t handleNewPacket(
const std::string &msg, uint32_t next_offset);
46 uint32_t readPacket(
const std::string &msg, uint32_t next_offset);
48 std::deque<std::string> outstanding_packets_;
50 struct InflightPacket {
52 size_t remaining_size;
55 std::optional<InflightPacket> inflight_;