yangzhg commented on a change in pull request #1723: URL: https://github.com/apache/incubator-brpc/pull/1723#discussion_r838108566
########## File path: src/brpc/protocol.h ########## @@ -56,6 +56,18 @@ class InputMessageBase; DECLARE_uint64(max_body_size); DECLARE_bool(log_error_text); +// Get the serialized byte size of the protobuf message, +// different versions of protobuf have different methods +// use template to avoid include `google/protobuf/message.h` +template<typename T> +inline uint32_t get_protobuf_byte_size(const T& message) { Review comment: done -- 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: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org