Re: [protobuf] Java and C++ exchange via socket

2011-10-06 Thread Christopher Head
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 On Wed, 5 Oct 2011 02:48:39 -0700 (PDT) yorick yorick.bru...@gmail.com wrote: [snip] Java : Socket sock;

[protobuf] Re: Java and C++ exchange via socket

2011-10-06 Thread yorick
After reading http://code.google.com/apis/protocolbuffers/docs/techniques.html#streaming that we suggested to me, I added a CodedInputStream in the C++ part. I have now for the Java (this is unchanged) : -- IRobotData data = getRobotData();

[protobuf] Re: Need help reading protobuf in Java that was compiled for C++ and does not have descriptor

2011-10-06 Thread Dale Durham
Benjamin, Thanks for the detailed and very helpful responses! First and foremost, believe me when I say that the decision to tinker with the more advanced protobuf features was somewhat forced on me, not a choice that I made. I have to decode messages sent over the wire as AMQP messages that are

[protobuf] Re: C++ Builder + Protobuff

2011-10-06 Thread •Jonas•
How is things looking ? Im really intersting in using libprotobuf-lite so I hope all your hardwork pays off. Thank you for trying. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to

[protobuf] Re: Need help reading protobuf in Java that was compiled for C++ and does not have descriptor

2011-10-06 Thread Benjamin Wright
hmm.. By wrapping C++ compiled protobufs I'm assuming that the protocol buffers in transit are serialized as protobufs... so the C++ is a non- issue (unless you mean some bizarre struct-based comms are going on... in which case good luck ;-) If you're in a web server environment you're probably

[protobuf] Extracting just one item of a reapeated collection!

2011-10-06 Thread Michael Bartel
I have a lot of data and need PBF just to extract the things i want from it, and not everything at once. I am getting the impression, that PBF is not suitable for that kind of needs, but I am pretty new to it, and maybe i'm overlooking something. I have for example: message x { repeated Y y

[protobuf] AS3 with INT64

2011-10-06 Thread hsl4125
ActionScript 3.0 has no int64 type. How can use int64 in ActionScript 3.0?? thanks. -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to

[protobuf] Trouble sending String representation of GPB from Java to C++

2011-10-06 Thread Jerry
Simple ( hopefully ) question. I am sending a protocol buffer message from windows over EMS to a C++ process that is running on linux. The text payload is generated as follows on my windows system: person.toByteString().toStringUtf8(). When the c++ side attempts to reanimate my person with the

Re: [protobuf] Re: Java and C++ exchange via socket

2011-10-06 Thread Jason Hsueh
Can you provide a wrapper OutputStream in your Java code so you can intercept the exact bytes that are written to the stream? It wasn't clear if in your last attempt you had removed the ObjectOutputStream issue or not. I would suggest first making sure that the bytes you receive on the C++ side

[protobuf] Issue 336 in protobuf: Support generic string type

2011-10-06 Thread protobuf
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 336 by olafvdspek: Support generic string type http://code.google.com/p/protobuf/issues/detail?id=336 ATM 3 overloads are generated: const ::std::string value const char* value const char* value, size_t size Could you add a

[protobuf] Re: Trouble sending String representation of GPB from Java to C++

2011-10-06 Thread Jerry
Thanks for the quick response Jason. Just to be clear, are you saying that I will not be able to send a String representation from Java to C+ + and expect it to work. In term of the sending code: --- String text = person.toByteString().toStringUtf8(); //or toString(charsetName) TextMessage tm

Re: [protobuf] Re: Trouble sending String representation of GPB from Java to C++

2011-10-06 Thread Jason Hsueh
On Thu, Oct 6, 2011 at 11:17 AM, Jerry gerald.d@gmail.com wrote: Thanks for the quick response Jason. Just to be clear, are you saying that I will not be able to send a String representation from Java to C+ + and expect it to work. AFAIK, String coerces text into UTF (I am not a Java

[protobuf] Re: Trouble sending String representation of GPB from Java to C++

2011-10-06 Thread Jerry
Just to follow on the off chance that someone as stupid as myself might be facing a similar issue in the future. As you implied in in your first response, using GPB Text Format on the producing side ( which amounts to calling toString() ) and a C++ TextFormat on the consuming side will indeed

Re: [protobuf] AS3 with INT64

2011-10-06 Thread Hochhaus, Andrew
On Thu, Oct 6, 2011 at 7:56 AM, hsl4125 qlhuang...@gmail.com wrote: ActionScript 3.0 has no int64 type. How can use int64 in ActionScript 3.0?? I'm not sure about ActionScript, but I have worked with 64-bit values in JavaScript protocol buffers so some of the following may be helpful to you.

Re: [protobuf] Extracting just one item of a reapeated collection!

2011-10-06 Thread Jason Hsueh
You could write our own decoder around CodedInputStream, manually reading and skipping the messages that you don't care about. The other option is to use an equivalent message definition message XAsBytes { repeated bytes y = 1; } And then manually decode the entry you want into Y. On Thu, Oct

Re: [protobuf] Simple working example of GzipOutputStream and GzipInputStream

2011-10-06 Thread Jason Hsueh
You need to use the SerializeToZeroCopyStream interface, since you want to pass in a custom stream. You use GzipOutputStream just like any other ZeroCopyOutputStream, except it needs to wrap the underlying stream implementation. Since you mention writing to a gzip file, you might do something

Re: [protobuf] Re: Java and C++ exchange via socket

2011-10-06 Thread Christopher Head
On Thu, 6 Oct 2011 01:00:37 -0700 (PDT) yorick yorick.bru...@gmail.com wrote: I have now for the Java (this is unchanged) : -- IRobotData data = getRobotData(); System.out.println(phi:+data.getPhi()+, distance:+data.getDistance()); int serDataSize =

[protobuf] Restricting the number of repeated fields per block

2011-10-06 Thread Diarmuid Lavin
I have a structure, something like { A Meta info about A B+ } Where there can be many many B objects. I am using C++ and want to generate a message that is small enough to send in a single UDP datagram of around 1024 bytes in size. I might have up to 2000 B blocks, and they can be up to 300