MCPcopy Create free account
hub / github.com/apache/brpc / ProxyAsync

Method ProxyAsync

example/coroutine/coroutine_server.cpp:91–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89 }
90
91 Awaitable<void> ProxyAsync(const EchoRequest* request,
92 EchoResponse* response,
93 google::protobuf::Closure* done) {
94 brpc::ClosureGuard done_guard(done);
95 EchoService_Stub stub(&_channel);
96 brpc::Controller cntl;
97 AwaitableDone done2;
98 stub.Echo(&cntl, request, response, &done2);
99 co_await done2.awaitable();
100 if (cntl.Failed()) {
101 response->set_message(cntl.ErrorText());
102 }
103 }
104
105private:
106 brpc::Channel _channel;

Callers

nothing calls this directly

Calls 4

awaitableMethod · 0.80
ErrorTextMethod · 0.80
EchoMethod · 0.45
FailedMethod · 0.45

Tested by

no test coverage detected