Please look up this code for context.
auto normalized_log = CreateNormalizedLog(builder, pairs);
builder.Finish(normalized_log);
auto buffPtr = builder.GetBufferPointer();
SendUdpPacket(&ipInfo, reinterpret_cast<SOCKET>(ipInfo.hdle), buffPtr, builder.GetSize());
I need to pack the size of the created buffPtr (with fixed two bytes). Is there any preferred way of appending/offsetting without copying the entire buffer?
I think I cannot add size to the schema, because after receiving I should know the size without calling getRootAsNormalizedLog.
Is there any way to add extra bytes to the resulting buffer?