pbc
pbc copied to clipboard
about 'optional' field .
the message like this: message Role{ optional int32 fieldA = 1; }
i got message from server, but server didn't packed 'fieldA' everytime . so how did know if 'fieldA' exist by lua code ?
FieldA has a type int32, it must be a value with this type any time. If the value equal the default value, the implemention would not encode it.
read the document of google protocol buffers for more detail.
发自我的 iPad
在 2015年1月8日,下午5:19,dhb118 [email protected] 写道:
the message like this: message Role{ optional int32 fieldA = 1; }
i got message from server, but server didn't packed 'fieldA' everytime . so how did know if 'fieldA' exist by lua code ?
— Reply to this email directly or view it on GitHub.
thanks @cloudwu