In my project I use protobuf c for the server and protobuf-net for the client. But protobuf c cannot decode classes where the client uses the "ProtoInclude" attribute.
This is the client code using protobuf-net
[ProtoContract]
public class MsgBase_Demo : MsgBase
{
/// <summary> id </summary>
[ProtoMember(11)]
public float id;
public MsgBase_Demo()
{
protoName = "MsgBase_Demo";
id = 110;
}
}
This is the server code using the protobuf c
message MsgBase_Extent
{
extend MsgBase
{
required MsgBase_Extent msgBase = 1000;
}
optional float id = 11;
}
How should I deal with this problem. I tried this https://www.indelible.org/ink/protobuf-polymorphism/Still not working. Maybe I should not adopt the way of inheritance?