What about something like this

message UnknownMessage 
{
    enum MessageType
    {
        MESSAGE_TYPE_A = 1;
        MESSAGE_TYPE_B = 2;
        MESSAGE_TYPE_C = 3;
    }
    
    required MessageType    msgType = 1;
    required bytes            msgPayload = 2;
}


On Wednesday, February 10, 2010 6:02:35 PM UTC-5, fokenrute wrote:
>
> Hi, I'm developing a C++ application and I use Protocol Buffers for
> network communications.
> Somewhere in my app, I receive messages which can be of different
> types and I'm searching for a mean to dynamically determine the type
> of these messages (which are stored in a buffer). I read something
> about the reflexion interface, but I don't konw how to use it to do
> what i want.
> Thanks in advance for your replies.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to