diff --git a/include/rest_rpc/const_vars.h b/include/rest_rpc/const_vars.h index 2beb0db..cd98135 100644 --- a/include/rest_rpc/const_vars.h +++ b/include/rest_rpc/const_vars.h @@ -26,6 +26,7 @@ struct message_type { }; static const uint8_t MAGIC_NUM = 39; +#pragma pack(4) struct rpc_header { uint8_t magic; request_type req_type; @@ -33,6 +34,7 @@ struct rpc_header { uint64_t req_id; uint32_t func_id; }; +#pragma pack() static const size_t MAX_BUF_LEN = 1048576 * 10; static const size_t HEAD_LEN = sizeof(rpc_header);