On Jul 23, 12:54 am, Benedikt Hallinger
wrote:
> Hello (and sorry for bothering) and thank you for your clarifying.
>
> > The "type" is simply transmitted as a tag on the wire. The wire format
> > of extensions is just like the wire format of a regular field - the
> > difference is that the con
Hello (and sorry for bothering) and thank you for your clarifying.
> The "type" is simply transmitted as a tag on the wire. The wire format
> of extensions is just like the wire format of a regular field - the
> difference is that the containing type (Packet) need not know about
> the extension
On Jul 21, 11:00 pm, Benedikt Hallinger
wrote:
> Hello,
> 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
Hello,
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 i
By the way you may want to look at the section on "Union Types" in the
docs: http://code.google.com/apis/protocolbuffers/docs/techniques.html#union
On Jul 21, 9:51 am, jasonh wrote:
> How about using extensions to solve this? You could define a generic
> message:
>
> message Packet {
> extensi
How about using extensions to solve this? You could define a generic
message:
message Packet {
extensions n to m;
}
// Payload messages
message TestMessage {
extend Packet {
optional TestMessage test = 10;
}
required string msg = 2;
}
message TestMessage2 {
extend Packet {
op
Just to be more precise: the overall goal is, that the messagetype
identification stuff should be managed entirely in the proto files. the
user should only be concerned to write his handlers and the network
protocol definitions.
Original Message
Subject: Detecting message type