Re: Problem to MergeFromCodedStream()

2009-01-13 Thread Kenton Varda
On Mon, Jan 12, 2009 at 8:32 PM, Dave Bailey d...@daveb.net wrote: I agree, and it seems to be a question that comes up frequently in this forum, so maybe we should add a page to the Wiki that discusses how to send and receive a stream of protobuf (or any) messages. I did add some

Re: Problem to MergeFromCodedStream()

2009-01-12 Thread chongyc
Thank you very much for your help. I want parsing string 's' by reading each a byte from s. What is alternative way that you can recommend to me. On Jan 12, 11:28 am, chongyc chongy...@gmail.com wrote: I write test code following below.         t2r::prot::Request msg0, msg2, msg3, msg4;  

Re: Problem to MergeFromCodedStream()

2009-01-12 Thread Kenton Varda
Read all the bytes into a buffer, then parse the buffer once you have the whole thing. On Mon, Jan 12, 2009 at 4:11 PM, chongyc chongy...@gmail.com wrote: Thank you very much for your help. I want parsing string 's' by reading each a byte from s. What is alternative way that you can

Re: Problem to MergeFromCodedStream()

2009-01-12 Thread chongyc
When I send multiple messages, I should delimit them, and parse the buffer. What is the best way delimitting it that you can recommend me ? On Jan 13, 8:18 am, Kenton Varda ken...@google.com wrote: Read all the bytes into a buffer, then parse the buffer once you have the whole thing. On

Re: Problem to MergeFromCodedStream()

2009-01-12 Thread Kenton Varda
Send the size of the message first, then the data. On Mon, Jan 12, 2009 at 4:34 PM, chongyc chongy...@gmail.com wrote: When I send multiple messages, I should delimit them, and parse the buffer. What is the best way delimitting it that you can recommend me ? On Jan 13, 8:18 am, Kenton