|
|
@ -23,7 +23,8 @@ public class Encoder : MessageToByteEncoder<BaseMsg>
|
|
|
|
protected override void Encode(IChannelHandlerContext context, BaseMsg obj, IByteBuffer output)
|
|
|
|
protected override void Encode(IChannelHandlerContext context, BaseMsg obj, IByteBuffer output)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
byte[] bytes = obj.ToBytes();
|
|
|
|
byte[] bytes = obj.ToBytes();
|
|
|
|
output.WriteBytes(bytes);
|
|
|
|
List<byte> list = new List<byte>(bytes);
|
|
|
|
output.WriteBytes(CarConst.EndChar);
|
|
|
|
list.AddRange(CarConst.EndChar);
|
|
|
|
|
|
|
|
output.WriteBytes(list.ToArray());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|