我需要组装一个protobuf消息,其中应该包含1个整数变量和一个整数数组。
package protobuf;
message myProto {
optional uint32 message_id =1;
optional int update = 2;
//here I have to add a array of integers
//can I write like optional int[] array =3;
//or should I use optional repeated array;
//where array is another message with int variable
}
我的做法正确吗?