I believe that's the way to do it.

I think you can also use the extends, but looks like other language
ports (like the C port) do not all support the extend mechanism.
( yet).

-john

On May 14, 12:45 pm, Vince <vincedup...@gmail.com> wrote:
> Hi,
>
> If I want to serialize many message in the same pipe,
> do I need one "master" message that includes all the others in
> optional
> and have a kind of messageType field in it to know which kind a
> message is inside?
>
> Like this,
>
> message A1 {...}
> message A2 {...}
>
> message master
> {
> enum type {...}
>
> required type t = 1;
> optional A1 a1 = 2;
> optional A2 a2 = 3;
>
> }
>
> Thanks,
> Vince
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to 
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/protobuf?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@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.

Reply via email to