Lidgren.Network.NetConnection.InitExpandMTU C# (CSharp) Method

InitExpandMTU() private method

private InitExpandMTU ( double now ) : void
now double
return void
        internal void InitExpandMTU(double now)
        {
            m_lastSentMTUAttemptTime = now + m_peerConfiguration.m_expandMTUFrequency + 1.5f + m_averageRoundtripTime; // wait a tiny bit before starting to expand mtu
            m_largestSuccessfulMTU = 512;
            m_smallestFailedMTU = -1;
            m_currentMTU = m_peerConfiguration.MaximumTransmissionUnit;
        }

Usage Example

        internal void AcceptConnection(NetConnection conn)
        {
            // LogDebug("Accepted connection " + conn);
            conn.InitExpandMTU(NetTime.Now);

            _handshakeManager.RemoveHandshake(conn.m_remoteEndPoint);

            lock (m_connections)
            {
                if (m_connections.Contains(conn))
                {
                    LogWarning("AcceptConnection called but m_connection already contains it!");
                }
                else
                {
                    m_connections.Add(conn);
                    m_connectionLookup.Add(conn.m_remoteEndPoint, conn);
                }
            }
        }
All Usage Examples Of Lidgren.Network.NetConnection::InitExpandMTU