On Wed, Jul 8, 2015 at 5:22 AM, cilen <cilend...@gmail.com> wrote:

> syntax = "proto3";
>
> package helloworld;
>
> option java_multiple_files = true;
> option java_package = "io.grpc.examples.helloworld";
> option java_outer_classname = "HelloWorldProto";
>
> // The greeting service definition.
> service Greeter {
>   rpc SayHello (HelloRequest) returns (HelloResponse) {}
> }
>
> // The request message containing the user's name.
> message HelloRequest {
>   string name = 1;
> }
>
> // The response message containing the greetings
> message HelloResponse {
>   string message = 1;
> }
>
>
> I save the above file into the helloworld.proto
> then I do the compiling,
>  --- the output files contains all the information about HelloRequest
> HelloResponse
> But without any useful interface information about the Greeter.
>
>
> Should I do the interface coding myself in Proto3(libprotoc 3.0.0) ,or
> something is wrong for my config or protoc installation
>
Sorry, I just realized you are actually compiling the grpc example proto
file so you are already using grpc.

The protoc compiler itself does not produce grpc outputs for service. You
need to install the grpc plugins for the language you are using and invoke
protoc with the plugin. For example, you may invoke protoc like this:

$ protoc -I ../../protos/ --grpc_out=.
--plugin=protoc-gen-grpc=grpc_cpp_plugin ../../protos/helloworld.proto


See the grpc example in C++: http://www.grpc.io/docs/installation/c.html


>
>
>
>
>  --
> 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/d/optout.
>

-- 
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/d/optout.

Reply via email to