Beispiel #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);
        }
 public abstract bool Decode(Common.NetworkBuffer msgBuffer, ref int msgCount);