[protobuf] Re: Problem with java generation when using imports

2011-01-12 Thread Meghana
Thanks for the reply Kenton. Here's the example - proto files : option java_outer_classname = KmObjectProtos; message KmObject { optional string id = 1; optional string eTag = 2; optional string eTagContents = 3; optional string cDate = 4; optional string

[protobuf] Large message vs. a list message for smaller messages

2011-01-12 Thread Meghana
In the protobuf documentation, it says that protobuf is good for working with small messages but not messages larger than 1MB in size. I think that this would still be true if a message was created only to handle lists of other message types. For ex. message A { optional int32 a1 = 1;

[protobuf] Java Newbie Question: Attaching a CodedInputStream to an NIO Socket

2011-01-12 Thread Nader Salehi
Hi Guys, I have a Java-base TCP server which needs some modification. It has to accept messages as CodedInputStream from C++ clients that send CodedOutputStream. The server uses NIO class java.nio.channels.SocketChannel to read from the socket. What would be the easiest way to attach a

[protobuf] Re: Problem with java generation when using imports

2011-01-12 Thread Kenton Varda
I get: // optional .KmObject kmobject = 1; public static final int KMOBJECT_FIELD_NUMBER = 1; private boolean hasKmobject; private KmObjectProtos.KmObject kmobject_ = KmObjectProtos.KmObject.getDefaultInstance(); public boolean hasKmobject() { return hasKmobject; } public

[protobuf] Issue 250 in protobuf: [PATCH] Maven-plugin does not work with M2Eclipse

2011-01-12 Thread protobuf
Status: New Owner: ken...@google.com Labels: Type-Defect Priority-Medium New issue 250 by adrian.wilkins: [PATCH] Maven-plugin does not work with M2Eclipse http://code.google.com/p/protobuf/issues/detail?id=250 maven-plugin always expects to add jar files to the classpath for .proto files,

[protobuf] Re: Issue 119 in protobuf: TYPE_BOOL collides with MacOS macro

2011-01-12 Thread protobuf
Comment #4 on issue 119 by dgivone: TYPE_BOOL collides with MacOS macro http://code.google.com/p/protobuf/issues/detail?id=119 Could we rename the FieldType values to FIELDTYPE_* instead of TYPE_*. This would also be more consistent with the WireType and CppType enums. -- You received this

Re: [protobuf] Java Newbie Question: Attaching a CodedInputStream to an NIO Socket

2011-01-12 Thread Evan Jones
On Jan 12, 2011, at 12:57 , Nader Salehi wrote: I have a Java-base TCP server which needs some modification. It has to accept messages as CodedInputStream from C++ clients that send CodedOutputStream. The server uses NIO class java.nio.channels.SocketChannel to read from the socket. What

Re: [protobuf] Large message vs. a list message for smaller messages

2011-01-12 Thread Evan Jones
On Jan 12, 2011, at 8:38 , Meghana wrote: Would ListA also be considered a large message or will the encoding be done on each individual A message making it immune to the large message problem? ListA itself will be a large message if it contains a large message of a sub-messages. If you are

Re: [protobuf] Java Newbie Question: Attaching a CodedInputStream to an NIO Socket

2011-01-12 Thread Nader Salehi
On 1/13/2011 00:56 Evan Jones writes: On Jan 12, 2011, at 12:57 , Nader Salehi wrote: I have a Java-base TCP server which needs some modification. It has to accept messages as CodedInputStream from C++ clients that send CodedOutputStream. The server uses NIO class

[protobuf] how to deal with the byte 0xFF in the business logic?

2011-01-12 Thread 飞 杨
Dear sir, I found, in the protocolbuf int encode, the byte 0xFF may appear, then how can i distinguish the EOS and the business -1, the two both are -1 when use the inputstream.read().. i my sense, -1 shouldn't appear in the business logic if use UTF-8 encode as -1 means the end of the stream and