achin...@gmail.com writes: > Thanks. Also how do I know the type of the message? One way would be > to check all optional fields (each represent a different type of > message) of the wrapper message and then pick the one which is not > null. Is that the only way?
You can add a (required) field to indicate the intended contents of the message, as described at http://code.google.com/apis/protocolbuffers/docs/techniques.html#union Note that Protocol Buffers will not enforce the "business rule" that the message's declared type and actual content must match, but it is straightforward to create a wrapper that will do that. Michael Poole --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---