I read data messages that comes in on a TCP/IP socket.
These message can be of different types example Person, Project etc,
that I have defined and the corresponding .proto files.

I can do:

    string s((char*)message,  strlen(message));
    Person p;

and then access the object Person.

However, I would like to have it more generic.
I cannot know from the beginning if the incoming message is a Person
or a Project or whatever.
Also, I am not so interested in the access methods, as I plan to loop
though the Fields using reflection to the decode the object.

Is there a way to decode the 'message' into a generic object (i.e a
Message) that I can then inspect using reflection?

I can accept to link in the different proto buffers at compile time.

I hope this makes sense.. and thanks for a great protocol !


You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to