[protobuf] protobuf2.3.0 crashes on using extensions

2010-02-06 Thread PromeLite
I am trying to use extensions in protcol buf(version 2.3.0) using visual studio 2008 c++. Here is my .proto file: message DataMsg { optional int32 msgtype=99; extensions 100 to max; } message FilterData { extend DataMsg { optional string filter_colu

Re: [protobuf] 1 failed test, CommandLineInterfaceTest.GeneratorPluginNotFound

2010-02-06 Thread Kenton Varda
Please provide more information: - What OS? - What error messages did the test print before failing? On Sat, Feb 6, 2010 at 12:16 PM, idleman wrote: > Hi everyone, > > I have been playing around with protobuf a while and should today > update from 2.2.0 to 2.3.0. Everything compiled but when I a

[protobuf] 1 failed test, CommandLineInterfaceTest.GeneratorPluginNotFound

2010-02-06 Thread idleman
Hi everyone, I have been playing around with protobuf a while and should today update from 2.2.0 to 2.3.0. Everything compiled but when I am running the tests does it says CommandLineInterfaceTest.GeneratorPluginNotFound test failed. I am using visual express and downloaded: http://protobuf.googl

Re: [protobuf] protobuf usage for socket communication

2010-02-06 Thread Evan Jones
On Feb 6, 2010, at 10:51 , PromeLite wrote: Is there a way to know what the structure type is so that the server can deserialize it to the corresponding structure?? If you only have a few possible types, see the documentation on Union types: http://code.google.com/apis/protocolbuffers/docs/

[protobuf] protobuf usage for socket communication

2010-02-06 Thread PromeLite
I am trying to a create communication between client / server using protocol buffers. My problem is that the client sends different structures. say for example: client wants person record to be written to data base or contact record to be written to database. Now I am able to serialize person and

Re: [protobuf] How can I use protoBuf with a socket

2010-02-06 Thread Evan Jones
On Feb 6, 2010, at 3:11 , hap 497 wrote: // put the serialized content to a buffer so that I can write it to socket char buf[128]; memset((char *) buf, 0, 128); memcpy (buf, msgStr.c_str(), requestMessage.ByteSize()); You can use msgStr.c_str() and msgStr.data() directly:

[protobuf] Re: PB parsing with empty/reset values

2010-02-06 Thread Hershiv Haria
I've been playing with the code this morning and found that the PB is sent, and can be accessed through the doPost method. I was calling doGet from doPost, and attempting to do all relevant actions in there (for consistency), so is there any reason why the inputstream should change due to the metho

[protobuf] Re: PB parsing with empty/reset values

2010-02-06 Thread Hershiv Haria
> It sounds to me like the receiving end didn't actually receive any data -- > you had it parse an empty message, or a garbage message. That's what I thought, it just seems weird that it would work in a separate project. > You should verify that the bytes you got from the serializer and the byte

[protobuf] Re: PB parsing with empty/reset values

2010-02-06 Thread Hershiv Haria
On Feb 5, 5:51 pm, Henner Zeller wrote: > Probably unrelated, but if you have binary file content you might > consider using the type 'bytes' instead of 'string'. I considered this but I really need an array of bytes, I'm not sure how this would work with the byte type > This is not really e

[protobuf] How can I use protoBuf with a socket

2010-02-06 Thread hap 497
Hi, I am trying to figure out how to use protobuf for socket communication between client and server (both in c++). I notice the serialize and parse method are either using string for a ostream/istream. And in c++ std, I don't think there is a way to create a ostream/istream via socket. So I am