On Mar 27, 1:32 pm, achin...@gmail.com wrote:
> If I understand correctly there is no good way to use proto buffers to
> stream different types of messages, right? For example if my stream
> has a mix of several messages of type m1 and m2, I will have to device
> a scheme outside of proto buffers to separate it into 2 streams and
> then pass it through parsers for each.
>
> In other words is there a way to do event based parsing using proto
> buffers, or even a way to say don't parse a repetitive field unless
> needed.

No, you don't have to do it into separate streams. Instead, stream a
sequence of messages each of which has either an m1, or an m2, or an
m3 etc. This basically ends up being (tag) (message) (tag) (message),
where the tag is effectively identifying the type of message.

All you need to do is create the wrapper message, and the rest should
work fine.

Jon
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to