[protobuf] Find the message type during processing of serialized message at run time!

2014-07-07 Thread Andrew Klitovchenko
Hi, I am writing an app that uses google protobuf to decode the serialized messages which were coded using .proto definitions. If I have the .proto file and during run time I have different types of messages coming to my app. I wan to be able to identify which message it is according to

Re: [protobuf] Find the message type during processing of serialized message at run time!

2014-07-07 Thread Ilia Mirkin
The serialized message does not contain any type information. You would either have to create a super-message for that, or have some other sort of knowledge of what type to expect. (A problem with the super-message approach is all the copying involved, so if that's a concern, you can just manually