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

Method SayHello

example/grpc_c++/server.cpp:35–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 GreeterImpl() {}
34 virtual ~GreeterImpl() {}
35 void SayHello(google::protobuf::RpcController* cntl_base,
36 const helloworld::HelloRequest* req,
37 helloworld::HelloReply* res,
38 google::protobuf::Closure* done) {
39 brpc::ClosureGuard done_guard(done);
40 brpc::Controller* cntl = static_cast<brpc::Controller*>(cntl_base);
41 if (FLAGS_gzip) {
42 cntl->set_response_compress_type(brpc::COMPRESS_TYPE_GZIP);
43 }
44 res->set_message("Hello " + req->name());
45 }
46};
47
48int main(int argc, char* argv[]) {

Callers 1

mainFunction · 0.80

Calls 2

nameMethod · 0.45

Tested by

no test coverage detected