[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

[protobuf] C++ Protobuf for packet serialization

2013-02-18 Thread Predator33
I'm trying to store information in a protobuf structure so that I can serialize it and send it over a UDP connection, and deserialize it on the other end. The issue I'm having is if i have: message Something { optional string somestr = 1; optional int32 someint1 = 2; optional int32 someint2 =