wwbmmm commented on code in PR #2328:
URL: https://github.com/apache/brpc/pull/2328#discussion_r1274307736


##########
src/brpc/controller.h:
##########
@@ -567,6 +568,14 @@ friend void 
policy::ProcessThriftRequest(InputMessageBase*);
     // -1 means no deadline.
     int64_t deadline_us() const { return _deadline_us; }
 
+    using after_rpc_resp_fn_t = std::function<void(Controller* cntl,
+                                               const 
google::protobuf::Message* req,
+                                               const 
google::protobuf::Message* res)>;
+
+    void set_after_rpc_resp_fn(after_rpc_resp_fn_t&& fn) { _after_rpc_resp_fn 
= fn; }
+
+    void call_after_rpc_resp(const google::protobuf::Message* req, const 
google::protobuf::Message* res);

Review Comment:
   函数命名,非简单getter/setter函数,使用大写开关驼峰命名



##########
src/brpc/controller.h:
##########
@@ -567,6 +568,14 @@ friend void 
policy::ProcessThriftRequest(InputMessageBase*);
     // -1 means no deadline.
     int64_t deadline_us() const { return _deadline_us; }
 
+    using after_rpc_resp_fn_t = std::function<void(Controller* cntl,
+                                               const 
google::protobuf::Message* req,
+                                               const 
google::protobuf::Message* res)>;
+
+    void set_after_rpc_resp_fn(after_rpc_resp_fn_t&& fn) { _after_rpc_resp_fn 
= fn; }
+
+    void call_after_rpc_resp(const google::protobuf::Message* req, const 
google::protobuf::Message* res);

Review Comment:
   函数命名,非简单getter/setter函数,使用大写开关驼峰命名



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to