I have been thinking about the most efficient way of  describing which 
message is being sent in a stream.  All fields have a numeric key, so 
how about messages also having a (optional) numeric key too?  Then the 
PB compiler could populate a global enumerator list of messages, which 
you could use in a message wrapper.


Scott Stafford wrote:
> You may want to consider the techniques described in the protobuf doc
> under Techniques/Union Types here:
>
> http://code.google.com/apis/protocolbuffers/docs/techniques.html
>
> By using an enum/extensions, you can use protobuf for the header as
> well as the payload.  The wrapper message would represent the channel
> number as enum or the extension field identifier.  The advantages:
>
> * You can harness protobuf's forward/backward compatibility tricks to
> modify the header
> * You can easily use varint encoding for the channel number
>
> Scott
>   


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to