Hi Marc, 

Thank you very much. I need to run a c++ server and java client using a 
TCPIP protocol. I have to write a message like "bla bla" in clinet but it 
would show also from the server side. I wrote the following to get a simple 
example by using the Person as a Message. I have generated the c++ and java 
file from the proto file. I have installed also maven. I dont know how to 
compile through the maven. It gives no ouptput.

Please help me. 

package tutorial;
//import google.protobuf.Descriptor;
//import "google/protobuf/objective-descriptor.proto";


option java_package = "com.example.tutorial";
option java_outer_classname = "AddressBookProtos";

message Person {
  required string name = 1;
  required int32 id = 2;        // Unique ID number for this person.
  optional string email = 3;

  enum PhoneType
   {
    MOBILE = 0;
    HOME = 1;
    WORK = 2;
   }

  message PhoneNumber {
  required string number = 1;
  optional PhoneType type = 2 [default = HOME];
  }

  repeated PhoneNumber phone = 4;
}

// Our address book file is just one of these.
message AddressBook {
  repeated Person person = 1;
}

..................

Thanks and regards,
Dilip Biswas
Software Engineer



On Thursday, 7 November 2013 21:32:38 UTC+1, Marc Gravell wrote:
>
> On 7 Nov 2013 20:32, "Marc Gravell" <marc.g...@gmail.com <javascript:>> 
> wrote:
>
>> What platform? But basically protobuf should be treated as a BLOB. Then 
>> you have two choices:
>>
>> - send it as a payload in an existing messaging stack
>> - write your own messaging layer on top of sockets - noting that because 
>> protobuf messages aren't delimited you also need to implement your own 
>> framing protocol
>>
>> In both cases, raw binary would be more efficient. If you have to use 
>> text, then base-64 would be suggested.
>>
>> Sorry if that isn't very specific, but it doesn't seem a very specific 
>> question.
>>
>> Marc
>> On 7 Nov 2013 20:23, "Dilip Biswas" <dilip.kum...@gmail.com <javascript:>> 
>> wrote:
>>
>>> Hallo, 
>>> I am new here in Protocol Buffers, I would like to know how can I write 
>>> a Message to get TCP/IP connection.
>>> Regards,
>>> Dilip, Software Entwickler
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Protocol Buffers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to protobuf+u...@googlegroups.com <javascript:>.
>>> To post to this group, send email to prot...@googlegroups.com<javascript:>
>>> .
>>> Visit this group at http://groups.google.com/group/protobuf.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>  

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to