Пример #1
0
 void InitInstance(byte[] data)
 {
     m_PredMsg           = null;
     packChunking        = new PackChunking(8);
     m_TotalDataReceived = 0;
     m_TotalDataSent     = 0;
     m_TotalSavedData    = 0;
     //m_TotalRawSent = 0;
     m_PredMsgReceived = 0;
     m_PredAckMsgSent  = 0;
     m_DataMsgSent     = 0;
     m_libMutex        = new object();
     LogUtility.LogUtility.LogFile("SenderLib:InitInstance", LogUtility.LogLevels.LEVEL_LOG_HIGH);
 }
Пример #2
0
        public MatchStateMachine(EndPoint Id, LongestMatch longestMatch, StreamChunckingLib.PackChunking packChunking, byte[] data, List <List <ChunkMetaData> > predMsg)
        {
            m_LongestMatch    = longestMatch;
            m_packChunking    = packChunking;
            m_Id              = Id;
            m_data            = data;
            m_PredMsg         = predMsg;
            m_SenderChunkList = new List <long>();

            m_ProcessedBytes          = m_packChunking.getChunks(m_SenderChunkList, m_data, 0, m_data.Length, true, false);
            m_SenderChunkListWithSha1 = new List <long>();
            m_packChunking.getChunks(m_SenderChunkListWithSha1, m_data, (int)0, m_data.Length, true, true);
            LogUtility.LogUtility.LogFile(Convert.ToString(m_Id) + " processedBytes " + Convert.ToString(m_ProcessedBytes) + " chunk count " + Convert.ToString(m_SenderChunkList.Count), ModuleLogLevel);
        }