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

Method Echo

test/brpc_coroutine_unittest.cpp:58–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56 EchoServiceImpl() {}
57 virtual ~EchoServiceImpl() {}
58 virtual void Echo(google::protobuf::RpcController* cntl_base,
59 const test::EchoRequest* request,
60 test::EchoResponse* response,
61 google::protobuf::Closure* done) {
62 // brpc::Controller* cntl = (brpc::Controller*)cntl_base;
63 // brpc::ClosureGuard done_guard(done);
64 // response->set_message(request->message());
65
66 // Create a detached coroutine, so the current bthread will return at once.
67 Coroutine(EchoAsync(request, response, done), true);
68 }
69
70 Awaitable<void> EchoAsync(const test::EchoRequest* request,
71 test::EchoResponse* response,

Callers 1

funcFunction · 0.45

Calls 1

CoroutineClass · 0.85

Tested by

no test coverage detected