Hi Hui,
Sorry for the slow reply, I was on leave.
messageToFlatArray() is a convenience function for when you don't mind
allocation and copying. If you want more control over serialization, you
can use MessageBuilder::getSegmentsForOutput() to get direct pointers to
the message's underlying
Hi CapnProto Team,
I understand the API to obtain a flat buffer of the built message is
capnp::messageToFlatArray.
However, the current API forces you to save the buffer on a returned
kj::Array words object. Is there a way I could pass in a
pre-allocated buffer, and let CapnProto to use that