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

Method Echo

example/parallel_echo_c++/server.cpp:37–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

senderFunction · 0.45

Calls 3

set_valueMethod · 0.45
valueMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected