gRPC c++ mixed synchronous and asynchronous rpc within one service

37 views
Skip to first unread message

Frank Xie

unread,
Jun 29, 2023, 4:43:14 PM6/29/23
to grpc.io
Hi,

I have a gRPC c++ server supporting one rpc which streams server side responses back to client side.  I like to add a synchronous rpc into the same service. By "synchronous", I mean a rpc like   "rpc   method1(RequestMsg) returns (RespMsg) {} " .

Any suggestion how to mingle those two types of rpc together into one service ? 

Thanks,
Frank

dfa...@google.com

unread,
Jun 30, 2023, 12:49:18 PM6/30/23
to grpc.io
[Sorry, forgot to reply-all]

There's nothing special about having multiple types of RPCs in a single service.  You can see an example of this in the route_guide sample code here: https://github.com/grpc/grpc/tree/master/examples/cpp/route_guide

Reply all
Reply to author
Forward
0 new messages