protobuf消息包含作为protobuf消息编组和解组的字段

时间:2015-09-25 22:24:37

标签: protocol-buffers

我有一条protobuf消息,类似于下面的消息a。

message a {
    message b xyz = 1; //message a basically is defined using message b here.
}
message b {
    int age = 1;
}

现在,当发送类型为a的消息时,我想知道我是否需要首先编组消息b,然后编组一个 - 同样解组msg(类型a),然后解组xyz(类型b)以获取数据? / p>

我在protobuf文档中没有找到任何关于它的内容,所以也许这不是必需的。想知道一个简单的元帅(a型)和unmarshal(a型)是否足够。

0 个答案:

没有答案
相关问题