| 55 | }; |
| 56 | |
| 57 | asio::awaitable<void> make_request(agrpc::GrpcContext& grpc_context, helloworld::Greeter::Stub& stub) |
| 58 | { |
| 59 | using RPC = agrpc::ClientRPC<&helloworld::Greeter::Stub::PrepareAsyncSayHello>; |
| 60 | grpc::ClientContext client_context; |
| 61 | client_context.set_deadline(std::chrono::system_clock::now() + std::chrono::seconds(5)); |
| 62 | RPC::Request request; |
| 63 | request.set_name("world"); |
| 64 | RPC::Response response; |
| 65 | const auto status = co_await RPC::request(grpc_context, stub, client_context, request, response); |
| 66 | |
| 67 | abort_if_not(status.ok()); |
| 68 | } |
| 69 | |
| 70 | struct GuardedGrpcContext |
| 71 | { |