c++ empty response async example

22 views
Skip to first unread message

윤석영

unread,
May 30, 2019, 11:53:40 AM5/30/19
to grpc.io
Can I get example codes for c++ empty reponse in async mode

My current code occurs compile error. 

    
    struct AsyncClientCall {
        google.protobuf.Empty reply;
        ClientContext context;
        Status status;
        std::unique_ptr<ClientAsyncResponseReader<google.protobuf.Empty>> response_reader;
    };



In file included from ./src/CommGrpcService.cpp:1:0:
./hdr/CommGrpcService.h:28:9: error: 'google' does not name a type
         google.protobuf.Empty reply;
         ^
./hdr/CommGrpcService.h:31:67: error: template argument 1 is invalid
         std::unique_ptr<ClientAsyncResponseReader<google.protobuf.Empty>> response_reader;
                                                                   ^
./hdr/CommGrpcService.h:31:72: error: template argument 1 is invalid
         std::unique_ptr<ClientAsyncResponseReader<google.protobuf.Empty>> response_reader;
                                                                        ^
./hdr/CommGrpcService.h:31:72: error: template argument 2 is invalid



Carl Mastrangelo

unread,
Jun 5, 2019, 1:38:36 PM6/5/19
to grpc.io
Can you build the examples that come with gRPC? Your error looks like you might not have protobuf installed.
Reply all
Reply to author
Forward
0 new messages