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

Method Echo

example/multi_threaded_echo_c++/server.cpp:38–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 EchoServiceImpl() {}
37 ~EchoServiceImpl() {}
38 void Echo(google::protobuf::RpcController* cntl_base,
39 const EchoRequest* request,
40 EchoResponse* response,
41 google::protobuf::Closure* done) {
42 brpc::ClosureGuard done_guard(done);
43 brpc::Controller* cntl =
44 static_cast<brpc::Controller*>(cntl_base);
45
46 // Echo request and its attachment
47 response->set_message(request->message());
48 if (FLAGS_echo_attachment) {
49 cntl->response_attachment().append(cntl->request_attachment());
50 }
51 }
52};
53} // namespace example
54

Callers 1

senderFunction · 0.45

Calls 2

messageMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected