Ejemplo n.º 1
0
        // Token: 0x0600227E RID: 8830 RVA: 0x000A0868 File Offset: 0x0009EA68
        internal static GranularLogDataMsg ReadFromNet(NetworkChannel ch, byte[] workingBuf, int startOffset)
        {
            int len = 52;

            ch.Read(workingBuf, startOffset, len);
            GranularLogDataMsg granularLogDataMsg = new GranularLogDataMsg();
            BufDeserializer    bufDeserializer    = new BufDeserializer(workingBuf, startOffset);

            granularLogDataMsg.FlagsUsed         = (GranularLogDataMsg.Flags)bufDeserializer.ExtractInt64();
            granularLogDataMsg.RequestAckCounter = bufDeserializer.ExtractInt64();
            granularLogDataMsg.LogDataLength     = bufDeserializer.ExtractInt32();
            if (granularLogDataMsg.LogDataLength > 1048576)
            {
                throw new NetworkCorruptDataException(ch.PartnerNodeName);
            }
            granularLogDataMsg.EmitContext                       = new JET_EMITDATACTX();
            granularLogDataMsg.EmitContext.cbLogData             = (long)granularLogDataMsg.LogDataLength;
            granularLogDataMsg.EmitContext.dwVersion             = bufDeserializer.ExtractInt32();
            granularLogDataMsg.EmitContext.qwSequenceNum         = bufDeserializer.ExtractUInt64();
            granularLogDataMsg.EmitContext.grbitOperationalFlags = (ShadowLogEmitGrbit)bufDeserializer.ExtractUInt32();
            granularLogDataMsg.EmitContext.logtimeEmit           = bufDeserializer.ExtractDateTime();
            JET_LGPOS lgposLogData = default(JET_LGPOS);

            lgposLogData.lGeneration = bufDeserializer.ExtractInt32();
            lgposLogData.isec        = (int)bufDeserializer.ExtractUInt16();
            lgposLogData.ib          = (int)bufDeserializer.ExtractUInt16();
            granularLogDataMsg.EmitContext.lgposLogData = lgposLogData;
            return(granularLogDataMsg);
        }
Ejemplo n.º 2
0
        private QueuedBlockMsg ReadUncompressedMsg(NetworkChannel netChan)
        {
            byte[]             networkReadWorkingBuf = this.m_networkReadWorkingBuf;
            GranularLogDataMsg granularLogDataMsg    = GranularLogDataMsg.ReadFromNet(netChan, networkReadWorkingBuf, 0);

            byte[] array = null;
            int    num   = 0;

            if (granularLogDataMsg.LogDataLength > 0)
            {
                this.GetAppendSpace(granularLogDataMsg.LogDataLength);
                array = this.m_currentBuffer.Buffer;
                num   = this.m_currentBuffer.AppendOffset;
                netChan.Read(array, num, granularLogDataMsg.LogDataLength);
                this.m_currentBuffer.AppendOffset = num + granularLogDataMsg.LogDataLength;
            }
            return(new QueuedBlockMsg(granularLogDataMsg.EmitContext, array, num, 0)
            {
                RequestAckCounter = granularLogDataMsg.RequestAckCounter,
                IOBuffer = this.m_currentBuffer
            });
        }