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

Method CallAfterRpc

example/asynchronous_echo_c++/server.cpp:75–85  ·  view source on GitHub ↗

optional

Source from the content-addressed store, hash-verified

73
74 // optional
75 static void CallAfterRpc(brpc::Controller* cntl,
76 const google::protobuf::Message* req,
77 const google::protobuf::Message* res) {
78 // at this time res is already sent to client, but cntl/req/res is not destructed
79 std::string req_str;
80 std::string res_str;
81 json2pb::ProtoMessageToJson(*req, &req_str, NULL);
82 json2pb::ProtoMessageToJson(*res, &res_str, NULL);
83 LOG(INFO) << "req:" << req_str
84 << " res:" << res_str;
85 }
86};
87
88int main(int argc, char* argv[]) {

Callers

nothing calls this directly

Calls 1

ProtoMessageToJsonFunction · 0.50

Tested by

no test coverage detected