Re: [protobuf] protobuf stringstream codedoutputstream issues

2019-07-30 Thread 'Adam Cozzette' via Protocol Buffers
You can use an extra layer of curly-brace nesting to ensure the CodedOutputStream is destroyed before you examine the output. See this test code for

Re: [protobuf] protobuf stringstream codedoutputstream issues

2019-07-29 Thread Rinka Yoshida
I'm experiencing the same issue too and I was wondering if you could please elaborate on what you mean by destroying it before using its output? Delete OstreamOutputStream and try to get the string contained in stringstream? I tried using StringOutputStream, but it seems like when I did

[protobuf] protobuf stringstream codedoutputstream issues

2013-04-14 Thread Predator33
Got a bit of confusion with using stringstream and the CodedOutputStream of protobuf. Essentially, for each packet i put in a packetid that is stored inside a protobuf message, then i put in the actual contents which is also a protobuf message. This code used to work when i was creating an

Re: [protobuf] protobuf stringstream codedoutputstream issues

2013-04-14 Thread Oliver Jowett
On Sun, Apr 14, 2013 at 7:26 PM, Predator33 predator...@gmail.com wrote: The only thing I could think of is maybe the protobuf stream doesn't flush itself out until the destructor is hit and since that never happens until after the fact, it never gets flushed? Yes, this will be what is