cmdmspaint commented on issue #2157:
URL: https://github.com/apache/brpc/issues/2157#issuecomment-1463138345

   我理解brpc包的结构是这样的,目前了解到RpcMessageHeader是24字节。
   
![image](https://user-images.githubusercontent.com/50624748/224207552-ad2fbcf4-956b-4503-98dd-b4cb5c77db4b.png)
   这个是RpcMeta的结构,按照对应的字节数进行解析。为什么对不上呢? enum类型应该是占4字节吧
   message RpcMeta {
     enum Type {
       REQUEST = 0;
       RESPONSE = 1;
     };
     required Type type = 1;                 // 4bytes
     required uint64 sequence_id = 2;  //8bytes
     optional string method = 100;       
     optional int64 server_timeout = 101;
     optional bool failed = 200;
     optional int32 error_code = 201;
     optional string reason = 202;
     optional CompressType compress_type = 300;
     optional CompressType expected_response_compress_type = 301;
   }


-- 
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