stringstream, and the c_str() method, were designed for strings. If there's a binary zero in the data it will not work very well. You could convert to the textual stream or find a way to extract binary from the protocol buffer you've created. I don't know protobuf well enough to help you with that. You might try stackoverflow.com if you can't figure it out.
On Mon, Feb 11, 2013 at 7:23 PM, Shaun Reich <[email protected]> wrote: > I'm using protobuf to send packets, I can serialize and deserialize them > just fine in the code I link below, even if I set one of the members to 0 > (e.g. set_versionminor(0). It works fine if I serialize the contents, then > do ss2 << ss.str(); to put that data into another buffer which i then > deserialize.. >
_______________________________________________ ENet-discuss mailing list [email protected] http://lists.cubik.org/mailman/listinfo/enet-discuss
