Lidgren.Network.NetConnectionStatistics.Reset C# (CSharp) Method

Reset() private method

private Reset ( ) : void
return void
		internal void Reset()
		{
			m_sentPackets = 0;
			m_receivedPackets = 0;
			m_sentMessages = 0;
			m_receivedMessages = 0;
			m_receivedFragments = 0;
			m_sentBytes = 0;
			m_receivedBytes = 0;
			m_resentMessagesDueToDelay = 0;
			m_resentMessagesDueToHole = 0;
		}

Usage Example

        private NetConnectionStatistics GetCurrentWindow(double now)
        {
            if (m_currentWindow == null)
            {
                return(null);
            }

            if (now - m_currentWindow.m_startTimestamp >= m_windowSize)
            {
                // close this window and open new (actually, flip and reset)
                NetConnectionStatistics tmp = m_previousWindow;
                m_previousWindow = m_currentWindow;
                m_previousWindow.m_totalTimeSpan = (float)(now - m_previousWindow.m_startTimestamp);
                m_currentWindow = tmp;
                m_currentWindow.Reset(now);
            }
            return(m_currentWindow);
        }
All Usage Examples Of Lidgren.Network.NetConnectionStatistics::Reset