chenBright commented on issue #2671:
URL: https://github.com/apache/brpc/issues/2671#issuecomment-2220724487
I've thought about this question too. Maybe we should use such an interface:
```c++
class ProtobufMessageManager {
public:
virtual google::protobuf::Message* GetRequestMessage(
const google::protobuf::Service** service,
const google::protobuf::MethodDescriptor* method) = 0;
virtual void ReturnRequestMessage(google::protobuf::Message* message) =
0;
virtual google::protobuf::Message* GetResponseMessage(
const google::protobuf::Service** service,
const google::protobuf::MethodDescriptor* method) = 0;
virtual void ReturnResponseMessage(google::protobuf::Message* message) =
0;
};
```
Let the user decide whether to pack request and response messages up to one
transaction, or just leave them separated.
--
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]