Hello,

I am using cap'n proto to serialize messages in C.
I am having a message schema:

struct Rv3ioRequest {
     reqId   @0: UInt64 = 0;
    union {
          hello   @1: Rv3ioHelloRequest;
          fileOpen  @2: Rv3ioFileOpenRequest;
.... (and so on)
      }
}

my questions are:
- I would like to validate the request before parsing:
rv3io_request.which > MAX_UNION_VALUE
is that possible? If so how can I get the union max value?

- I would like to simulate invalid request using CC test:
rv3io_request->which = MAX_UNION_VALUE
Is that possible?

Thanks,
Ortal Levi

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to