[protobuf] sending a message over TCP from a C++ client to a Java server

2010-10-13 Thread Paul
code I have. I am not sure what I am doing wrong. I don't know if I am doing things correctly on the server (Java) side. Please let me know if you see any problems! Thanks a lot! Paul SERVER SIDE CODE: ServerSocket sock = new ServerSocket(7003); Socket liveSock = sock.accept(); handle

[protobuf] Re: sending a message over TCP from a C++ client to a Java server

2010-10-13 Thread Paul
, 2010, at 15:13 , Paul wrote: On the client side (in C++), I open a TCP socket connection on the same port with the server's IP address.  I serialize the message using SerializeToCodedStream into an array using ArrayOutputStream.  After serializing it, I send it over the TCP connection using

[protobuf] Re: sending a message over TCP from a C++ client to a Java server

2010-10-13 Thread Paul
ok thanks a lot! I ended up finding that my TCP send function was not set up correctly. Once that was fixed, it worked fine. Thanks! On Oct 13, 2:20 pm, Evan Jones ev...@mit.edu wrote: On Oct 13, 2010, at 16:49 , Paul wrote: Thanks for the suggestion.  However, I am already prepending

[protobuf] buffer sizes when sending messages from c++ to java

2010-10-19 Thread Paul
out all the fields. For some reason, it is necessary for me to cut off the last two bytes when sending over TCP. Any ideas as to why this is? Thanks a lot! Paul -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group, send

[protobuf] Re: buffer sizes when sending messages from c++ to java

2010-10-20 Thread Paul
ok thanks a lot guys! both ByteCount() and VarintSize32() worked for me! Paul On Oct 20, 3:13 am, Evan Jones ev...@mit.edu wrote: On Oct 20, 2010, at 2:13 , Kenton Varda wrote: But you are actually writing a varint32, which can be anywhere   between 1 and 5 bytes depending on the value

[protobuf] Re: omitting tag numbers

2010-10-25 Thread Paul
ok that makes sense. thanks! On Oct 22, 4:02 pm, Henner Zeller henner.zel...@googlemail.com wrote: On Fri, Oct 22, 2010 at 15:01, Paul mjpabl...@gmail.com wrote: Hi, This may seem like a basic question, but I find having to label the .proto file with unique tag numbers for each field

[protobuf] Re: Message missing required fields exception when parsing a message that has required fields defaulted

2010-10-25 Thread Paul
I've gotten this message for reasons other than the field not being set. make sure that you have the number of bytes on the delimiters set correctly on the C++ side. also, maybe stringProperty should be string Property (two words). On Oct 22, 9:12 am, locky true.n...@gmail.com wrote: I have a

[protobuf] outer classname for C++

2010-10-25 Thread Paul
Hi, In the example of the .proto definition in Java, there is a option java_outer_classname = AddressBookProtos; Is there an equivalent statement for C++? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To post to this group

[protobuf] Re: outer classname for C++

2010-10-25 Thread Paul
ok thanks. On Oct 25, 12:49 pm, Daniel Wright dwri...@google.com wrote: No -- in C++ the message classes are placed directly in a namespace named after the package, so there's no outer class. On Mon, Oct 25, 2010 at 11:42 AM, Paul mjpabl...@gmail.com wrote: Hi, In the example

[protobuf] protocol buffer within a protocol buffer from C++ to Java

2010-10-25 Thread Paul
contain only UTF-8; use the 'bytes' type for raw bytes. how do I serialize meas_rec into bytes instead? Also, once I have it on the Java side, how do I deserialize? would I use parseFrom(byte[] data) ? Thanks, Paul -- You received this message because you are subscribed to the Google Groups

[protobuf] Re: protocol buffer within a protocol buffer from C++ to Java

2010-10-26 Thread Paul
ok thanks. changing to optional bytes worked. also, instead of parseFrom, I ended up using parseDelimitedFrom on the Java side, after serializing with SerializeToCodedStream on the C++ side. On Oct 26, 4:59 am, Evan Jones ev...@mit.edu wrote: On Oct 25, 2010, at 21:45 , Paul wrote

[protobuf] including common message definitions across .proto files

2010-10-26 Thread Paul
Hi, Suppose I have two files, file1.proto and file2.proto, and I have a message defined in file1 that I want to use in file2. How would I include the message from file1? Is there an include statement I would use as in C or C++? file1.proto message M1 { optional string id = 1; }

[protobuf] Re: including common message definitions across .proto files

2010-10-26 Thread Paul
got it, thanks. On Oct 26, 11:33 am, Henner Zeller henner.zel...@googlemail.com wrote: On Tue, Oct 26, 2010 at 11:29, Paul mjpabl...@gmail.com wrote: Hi, Suppose I have two files, file1.proto and file2.proto, and I have a message defined in file1 that I want to use in file2.  How would I

RE: Storing complex graphs of objects?

2009-03-27 Thread Paul Runyan
. Best regards, Paul _ Looking to change your car this year? Find car news, reviews and more http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi

[protobuf] Re: Any sample messages/data for optimization out there?

2010-03-09 Thread Paul Rudd
It doesn't have to be. CodedInputStream.newInstance() is very expensive for small messages. Eliminating the call yields much better results. For example: Benchmarking benchmarks.GoogleSpeed$SpeedMessage1 with file ../ google_message1.dat Deserialize from byte string: 20354111 iterations in

[protobuf] serialize to a file using FileOutputStream

2010-10-11 Thread Paul Yang
Hi, I am new to protocol buffers, and I am trying to serialize a message to a file. I need to serialize the file so that in can be opened in Java using parseDelimitedFrom(). However, when I write to the file using SerializeToCodedStream or SerializeWithCachedSizes, nothing happens to the

[protobuf] Improving negative number storage

2011-12-05 Thread Paul TOTH
as a positive VarInt) Then you don't need to specify sint32/64 in the Message and integers will be stored in the most efficient way each time, regardless of they sign. Regards from France Paul TOTH -- You received this message because you are subscribed to the Google Groups Protocol Buffers group

[protobuf] Code generation error (protobuf-net bug)

2013-01-21 Thread paul . baranov
, Paul -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To view this discussion on the web visit https://groups.google.com/d/msg/protobuf/-/VWfPUfjIeqIJ. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group

[protobuf] Re: Serialize with Length Prefix

2013-02-20 Thread Paul Shafer
First time poster and new to protobuf/protobuf-net so forgive me if this has already been addressed. But I've searched quite a bit and cant find anofficial answer. If you want to use the fieldNumber argument in your SerializeWithLengthPrefix/TryDeserializeWithLengthPrefix for message type

[protobuf] big endian system support dropped (powerpc and mips)?

2013-04-03 Thread Flo Paul
Hi, wondering if support for PPC and MIPSEB has been dropped. It's not implemented in the platform headers any more (2.5.0) and doesn't cross compile on those systems. Has support been dropped for big endian systems? It was working in previous versions (2.4.1) and there has been an issue

[protobuf] Arena allocation with proto v2.x? - release vs syntax

2015-06-24 Thread Paul Baxter
I had thought arena allocation was available in latest v2.x releases, but the latest release 2.6.1 from October 2014 is just prior to adding arena allocation. Is there to be a v2.x release with arena support supporting the additional C++ code generation? Or is it intended to only be available

[protobuf] bazel rules_protobuf (java)

2016-08-01 Thread Paul Johnston
for others with this requirement. PRs definitely welcome for improvements or support for additional language output. Cheers, Paul -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving e

Re: [protobuf] Trying to use C++ implementation of python but api_implementation.Type() still returns 'python' instead of 'cpp'

2016-08-01 Thread Paul Johnston
"--cpp_implementaion" misspelled, should be "--cpp_implementation" On Monday, August 1, 2016 at 1:28:29 PM UTC-6, Oi Lee wrote: > > When I do > [localhost python]$ sudo python setup.py build --cpp_implementaion > > Installed [...]/protobuf-2.6.1/python/.eggs/google_apputils-0.4.2-py2.7.egg >

[protobuf] Re: Compiling Protobuf on VxWorks C++

2016-08-04 Thread Paul Johnston
https://github.com/google/protobuf/blob/master/BUILD I have protobuf available in my workspace as @com_github_google_protobuf This reports the (file) dependencies required to build the :protobuf rule: $ bazel query "deps(@com_github_google_protobuf//:protobuf)"

[protobuf] Re: Compiling Protobuf on VxWorks C++

2016-08-04 Thread Paul Johnston
Sorry, that paste was incomplete. Try this one. *@com_github_google_protobuf//:protobuf* *@com_github_google_protobuf//:src/google/protobuf/wrappers.pb.cc* *@com_github_google_protobuf//:src/google/protobuf/wire_format.cc*

[protobuf] Re: what to put in WORKSPACE and/or BUILD files to enable the cc_proto_library rule?

2016-08-05 Thread Paul Johnston
1. During the loading phase, bring the google/protobuf into your WORKSPACE so you can refer to it as @com_github_google_protobuf later. The bazel convention is to have fully qualified names, flattening special characters to underscore. git_repository( name = "com_github_google_protobuf",

[protobuf] Re: service without gRPC

2016-08-05 Thread Paul Johnston
, Paul On Friday, August 5, 2016 at 9:03:47 AM UTC-6, Mohamed Koubaa wrote: > > Hello, > > As per the language guide, defining a service in a .proto file will > generate RPC stubs which we can implement (or let gRPC implement). > https://developers.google.com/protocol-buffers/do

[protobuf] Re: Confused about directory structure from generated Go code

2016-09-01 Thread Paul Johnston
Consider using the import map feature of the protoc-gen-go plugin. Looks something like this: MAPPING_1="foo/bar.proto=github.com/foo/bar" MAPPING_1="foo/baz.proto=github.com/foo/baz"

[protobuf] Making Java JsonFormat and TextFormat extensible

2017-11-20 Thread Paul Gross
that the two Printers don't share an interface, allowing others to more easily add custom printers. Is this something that has come up before? Or maybe we're off the beaten path? Thanks, Paul -- You received this message because you are subscribed to the Google Groups "Protocol Buffers&q

[protobuf] protoc generated c++ files

2020-05-06 Thread Paul Lemay
Hello, I have this proto files where the root file is defined as below: syntax = "proto3"; package upfservice.v1; import "session.proto"; import "hello.proto"; // The Upfu_BfRuntime service definition. service UPFService { // Initial handshake initiated by client. rpc Hello(stream

Re: [protobuf] protoc generated c++ files

2020-05-07 Thread Paul Lemay
/tutorials/basic/cpp/#generating-client-and-server-code > > > On Wed, May 6, 2020 at 6:00 PM Derek Perez wrote: > >> Are you generating the C++ code with the proper grpc plugin as well? >> Services won't generate useful stubs without that. >> >> On Wed, May 6, 20

Re: Standard for RPC proto

2008-10-27 Thread Paul P. Komkoff Jr
On 26 окт, 02:53, Alan Kligman [EMAIL PROTECTED] wrote: I haven't had much to add recently. Protobuf-rpc is based heavily on json-rpc, so there's really nothing new behind it. It works well for my own use and is generic enough to probably work well for most other people. Is there a great

Re: Standard for RPC proto

2008-10-28 Thread Paul P. Komkoff Jr
On Oct 28, 2:02 am, Kenton Varda [EMAIL PROTECTED] wrote: I don't really have a stake in the design of a protobuf-based RPC format.  However, I'd like to point out that the design philosophy we tend to prefer at Google is to keep each layer of the system as simple as possible, and implement

Re: Standard for RPC proto

2008-10-28 Thread Paul P Komkoff Jr
On Tue, Oct 28, 2008 at 9:07 PM, Pavel Shramov [EMAIL PROTECTED] wrote: By the way one of the simpliest ways for RPC is to use HTTP transport. It's have some limitations (e.g large overhead for small messages) but also some benefits (e.g many libraries for performing HTTP calls and simple

[protobuf] Generated source build issues (C++)

2023-02-13 Thread Paul Nienaber (CW)
/FlightSql.pb.h:49:88: error: expected ';' after top level declarator ARROW_FLIGHT_SQL_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_FlightSql_2eproto; [...] Thanks in advance for any insight! Cheers ~Paul -- You received this message because you

Re: [protobuf] What is the most efficient protobuf type (in C++) for storing ipv4 or ipv6 address? My address is a boost::asio::ip::address_v4 (or v6)

2018-07-25 Thread 'Paul Marks' via Protocol Buffers
Use a bytes field: 4 for IPv4, 16 for IPv6. Ideally, you should use an IP address library with a "packed bytes as std::string" input/output. The in_addr/in6_addr types are stored as 4 or 16 bytes in RAM. -- You received this message because you are subscribed to the Google Groups "Protocol

Re: [protobuf] What is the most efficient protobuf type (in C++) for storing ipv4 or ipv6 address? My address is a boost::asio::ip::address_v4 (or v6)

2018-07-31 Thread 'Paul Marks' via Protocol Buffers
On Tuesday, July 31, 2018 at 6:10:27 AM UTC-7, sanjana gupta wrote: > > Hello Marc, > > I wanted to let you know that I tried using *fixed32 and fixed64* > protobuf types and it has helped me save quite some bytes on the encoded > data size. Allow me to show the protobuf message I created which