Exemplo n.º 1
0
 public byte[] Encode(BaseProtocolVO vo)
 {
     var binWriter = new ProtocolBinaryWriter(new MemoryStream());
     binWriter.Write(vo.MessageId);
     vo.encode(binWriter);
     binWriter.Seek(0, SeekOrigin.Begin);
     int len = (int)binWriter.BaseStream.Length;
     var bytes = new byte[len];
     binWriter.BaseStream.Read(bytes, 0, len);
     return bytes;
 }
Exemplo n.º 2
0
        //子类覆写
        public virtual void encode(ProtocolBinaryWriter binWriter)
        {

        }