Re: [capnproto] How to keep some incoming messages as is and reuse?

2020-09-30 Thread 'Kenton Varda' via Cap'n Proto
Hi Ambrase, copyToUnchecked() does not write a segment table at the beginning of the message. That's probably why you're seeing a message 8 bytes shorter. copyToUnchecked() and readMessageUnchecked() are difficult to use correctly (and are insecure when used incorrectly). I strongly recommend aga

[capnproto] How to keep some incoming messages as is and reuse?

2020-09-29 Thread Ambrase
Hi I have an input byte buffer with N messages. There are 2 cases: this byte buffer is zero-byte packed or not. I read messages like this: capnp::PackedMessageReader packedReader(cpnpReader.getAdapter(), capnp::ReaderOptions(), cpnpReader.getArray()); (where the adapter is an adapter for InputS