There is no way to find out a message's type if you don't know it already.
So, you'll need to arrange to communicate the type yourself. The easiest
way is to write an "envelope" message that is a union of all your other
messages.
struct OuterMessage {
union {
foo @0 :FooMessage;
bar @1
Thank you.
On Saturday, July 17, 2021 at 10:04:01 AM UTC-5 ken...@cloudflare.com wrote:
> Ideally, you'd update the implementation of `getBuff()` so that it
> allocates an aligned buffer. Note that malloc() always returns aligned
> buffers, so if you can make it so that the pointer returned by
If the sender is sending any number of different data types that have been
serialized across the network, how does one know which type is coming in so
that it can be pulled off using FlatArrayMessageReader's::getRoot<>?
E.g., say this while loop is constantly reading serialized data from the
Ideally, you'd update the implementation of `getBuff()` so that it
allocates an aligned buffer. Note that malloc() always returns aligned
buffers, so if you can make it so that the pointer returned by getBuff() is
one that was allocated directly by malloc(), then it should work. Probably,
though,