thank you very much for the ideas. Since i will have a unknowable ammount
of Message types, extensions would be the way to go.
Your were right with the assumption that i use Java.
The "construct and send that message" stuff is not the problem, the main
problem is, how i should parse the incoming ByteBuffer (or byte).
I just cant figure out how i would be able to access the packets type.
What im guesing now is, that since i will only send "Packet" messages (to
stick to the threads examples) in the future, my lib will know that it only
needs to deal with that "wrapper" type. From that i will access the payload
using the extension methods?
so the decoder part will work like this:
- get byte array from wire
- parse that data with the Packet-message types builder
- now we have a Packet-object with the header fields set and the payload as
- extract the payload object
- push it to the appropriate handler
But how exactly this would work with the above example? Is the "type" then
transmitted as string?
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to firstname.lastname@example.org
To unsubscribe from this group, send email to
For more options, visit this group at