On Feb 27, 2012, at 17:27 , waynix wrote:
> 1. Is this still the way to do it? Seems quite cumbersome (to lazy me ;-).  
> Is there  a wrapper built in to do this?

Yes. Sadly there is no wrapper included in the library.

> 2. If I understand Jason's suggestion riht, the length is really not
> part of the message, and the sender has to explcitly set it, instead
> of having protobuf encode it in. Which means a generic third party
> sender using my .proto file would not be sufficient.  Plus how would
> they know the length before encoding the message proper? Filling it in
> after the fact would change the length again?     or I am totally
> missing it.

As long as both sides encode the length in the same way , just having the right 
.proto will do the trick. 

> 3. A related quesiton is in general do I have to manage reading of the
> socket, or for that matter any istream, and spoon feed the protobuf
> parser until it says OK, that's a whole message?

Basically yes. There is a sketch of some example code here:


Good luck,



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

Reply via email to