[protobuf] Receiving multiple message types

2012-03-19 Thread Jens Rantil
Hi, I'm a newcomer to protobuf and am trying to wrap my head around some things. Let's say I have a message receiver of some kind. It can receive different types requests. All messages are encoded in protobuf and my receiver has all *.proto message definitions necessary be able to decode all

Re: [protobuf] Receiving multiple message types

2012-03-19 Thread Jens Rantil
Hi again, I seem to have found the answer myself: http://code.google.com/apis/protocolbuffers/docs/techniques.html#union Regards, Jens On Sunday, March 18, 2012, Jens Rantil jens.ran...@gmail.com wrote: Hi, I'm a newcomer to protobuf and am trying to wrap my head around some things. Let's

[protobuf] Re: Receiving multiple message types

2012-03-19 Thread Jim Morris
There are several ways to do it, on eis called unions and the other is to use extensions. My blog entry here covers the latter and has links to the union method. http://blog.wolfman.com/articles/2011/11/23/how-to-implement-polymorphic-protocol-buffers-in-java You are on the right track though