天蓬老师2017-04-17 11:11:19
The data type of protobuf repeated is similar to C ’s Vector and list, and can only transmit the same data type.
Of course, if you want to transmit multiple data types, you can use a method similar to C union, using a large message. Each field of the message is marked with optional. When you are processing the business, you can only use one field at a time. Assignment can also achieve the purpose.
In addition: repeated can only indicate whether there is data or not. When there is no data, there is ambiguity in whether to keep the original data or delete all data. Additional fields are required for processing.
http://blog.csdn.net/chenxiaohong3905/article/details/6929430
http://blog.csdn.net/chenxiaohong3905/article/details/6906459
大家讲道理2017-04-17 11:11:19
The protobuf repeated type is equivalent to the vector of std. It can be used to store N contents of the same type. I found an article to introduce the usage of protobuf repeated.
http://blog.csdn.net/mycwq/ar...