Send webpage config in multiple parts
Change-Id: I87b90ea5ec498e93647bb04012a51f687c05a4a0
diff --git a/aos/network/web_proxy_utils.h b/aos/network/web_proxy_utils.h
index 0672ddc..09ad333 100644
--- a/aos/network/web_proxy_utils.h
+++ b/aos/network/web_proxy_utils.h
@@ -1,5 +1,7 @@
+#include "absl/types/span.h"
#include "aos/network/web_proxy_generated.h"
#include "aos/events/event_loop.h"
+#include "aos/flatbuffers.h"
namespace aos {
namespace web_proxy {
@@ -15,6 +17,10 @@
flatbuffers::FlatBufferBuilder *fbb, const Context &context,
int channel_index, int packet_index);
+// Packs the provided raw data into a series of MessageHeader's of the
+// appropriate length.
+std::vector<FlatbufferDetachedBuffer<MessageHeader>> PackBuffer(
+ absl::Span<const uint8_t> span);
} // namespace web_proxy
} // namespace aos