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

Method CallAfterRpc

example/http_c++/http_server.cpp:71–81  ·  view source on GitHub ↗

optional

Source from the content-addressed store, hash-verified

69
70 // optional
71 static void CallAfterRpc(brpc::Controller* cntl,
72 const google::protobuf::Message* req,
73 const google::protobuf::Message* res) {
74 // at this time res is already sent to client, but cntl/req/res is not destructed
75 std::string req_str;
76 std::string res_str;
77 json2pb::ProtoMessageToJson(*req, &req_str, NULL);
78 json2pb::ProtoMessageToJson(*res, &res_str, NULL);
79 LOG(INFO) << "req:" << req_str
80 << " res:" << res_str;
81 }
82};
83
84// Service with dynamic path.

Callers

nothing calls this directly

Calls 1

ProtoMessageToJsonFunction · 0.50

Tested by

no test coverage detected