I don't seem to understand anything simple about the Buffers protocols, but this is a very important issue for me and for my real use.
When reading documentation about protocol buffers, I donβt understand how to find out which message needs to be decoded from the stream? All examples are about a specific message, but if you have defined several completely different messages and want to send these messages between two processes - how do you know which message you just received?
Or maybe the protocol buffers are not trying to solve this problem and leave this question to a different level of abstraction?
Or maybe I should pack the message in a structure like this:
message wrapper { required string message_name = 1; string packed_message = 2; }
And then I have to decode the message in 2 steps: first get the link_name, and then decode the real packed message in the second step, should I not?
source share