Ejemplo n.º 1
0
        public Object DeserializeByteBuffer(Common.NetworkBuffer inBuffer, int offset, int size, Type protoType)
        {
            MemoryStream stream    = new MemoryStream(inBuffer.GetBuffer(), offset, size);
            Object       outObject = null;

            try
            {
                outObject            = protobufSerializer.Deserialize(stream, protoType);
                inBuffer.ReadOffset += size;
            }
            catch (Exception ex)
            {
                Logger.Error(ex.StackTrace);
            }
            return(outObject);
        }
Ejemplo n.º 2
0
 public abstract bool Decode(Common.NetworkBuffer msgBuffer, ref int msgCount);