On Fri, Sep 19, 2008 at 9:50 AM, Mars <[EMAIL PROTECTED]> wrote: > > just want to find some sample code for Class Service: > > http://code.google.com/apis/protocolbuffers/docs/reference/python/google.protobuf.service.Service-class.html
That's the Python version. Shouldn't you be looking at the Java version? http://code.google.com/apis/protocolbuffers/docs/reference/java/com/google/protobuf/Service.html for example: > given .proto .java files below, > how to use simply use them in some basic Java network program, such as > ServerSocket or DatagramSocket? Maybe look at some of the RPC implementations people are working on: http://code.google.com/p/protobuf/wiki/RPCImplementations > > > ============================= > # .proto > message Req1 { > required int32 id = 1; > } > > message Res1 { > required string name = 1; > } > > service Serv1 { > rpc Func1(Req1) returns (Res1) { > option name = "name1"; > } > } > > ============================== > // .java > public class MyServ implements Serv1 { > > public EmptyMessage Func1(RPC rpc, Req1 req) throws RpcException { > //... > } > } > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---