Re: protoc and python imports

2008-10-29 Thread Alan Kligman
That works for me. Cheers, alan On Oct 28, 2:40 pm, "Kenton Varda" <[EMAIL PROTECTED]> wrote: > The model used by the protocol compiler is to assume that the .proto files > are located in a tree that parallels the Python package tree. We don't want > to get into relative imports because they ca

Re: Standard for RPC proto

2008-10-29 Thread fpmc
Out of the several specifications, a problem I find is they all use serialized messages as a byte string as part of the message. That's inefficient and in the case of C++ involves triple-copying - from socket buffer to kernel buffer to user buffer to parsed message. At the very least that last c

Re: Extensions becoming unknown fields

2008-10-29 Thread alent427
On Oct 29, 4:42 am, Jon Skeet <[EMAIL PROTECTED]> wrote: > You need to pass in an ExtensionRegistry in the parseFrom call. Have a > look at the unit tests for examples (search for "extension"). Thanks Jon! I think I have a better understanding of how things work now. --~--~-~--~~

Re: reading one message at a time

2008-10-29 Thread Moonstruck
thanks & regards On Oct 29, 2:40 am, "Kenton Varda" <[EMAIL PROTECTED]> wrote: > On Tue, Oct 28, 2008 at 6:35 AM, Moonstruck <[EMAIL PROTECTED]> wrote: > > > you mean we should write the file like this? > > (sizeof a message) | (serialized message) | (sizeof another message) > > | (another serial

Re: Extensions becoming unknown fields

2008-10-29 Thread Jon Skeet
On Oct 28, 11:23 pm, [EMAIL PROTECTED] wrote: > and on the receiver side: >     // receive the message >     byte[] buffer = receive(); >     // parse the message from the array >     Message msg = Message.parseFrom(buffer); >     // check if message has the extension >     if(msg.hasExtension(