This is my proto file :
message MSG {
required MsgCodes MsgCode = 1;
optional int64 Serial = 2; // Unique ID number for this person.
required int32 From = 3;
required int32 To = 4;
//bla bla...
enum MsgCodes
{
MSG = 1;
FILE = 2;
APPROVE=4;
ACK=8;
ERROR_SENDING=16;
WORLD=32;
}
}
In my C# I'm trying to :
msg = msg.ToBuilder().SetMsgCode(msg.MsgCode | MSG.Types.MsgCodes.ACK | MSG.Types.MsgCodes.APPROVE).Build();
SendToJava(msg);
But the JAVA tells me : missing MsgCode ( which is a required
)
Removing the combination - does solve it
But I need to specify combinations
Question
How can I solve it ?
nb :
The weird thing is that if I create a msg
and set multiple enums , and then reads it in C# again - it does work...:-(