yanglimingcn commented on code in PR #3144:
URL: https://github.com/apache/brpc/pull/3144#discussion_r2508486089
##########
src/brpc/policy/baidu_rpc_protocol.cpp:
##########
@@ -101,44 +106,116 @@ static void SerializeRpcHeaderAndMeta(
ParseResult ParseRpcMessage(butil::IOBuf* source, Socket* socket,
bool /*read_eof*/, const void*) {
+
char header_buf[12];
- const size_t n = source->copy_to(header_buf, sizeof(header_buf));
+ size_t n = 0;
Review Comment:
I think it would be better to put the baidu_rpc_protocol.cpp file containing
GPU functionality into a separate file called baidu_rpc_with_gpu_protocol.cpp,
or to define a new protocol. Currently, the macro definitions generate too many
if-else statements.
--
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]