SIPSorcery.Net.STUNServer.STUNServer C# (CSharp) Method

STUNServer() public method

public STUNServer ( IPEndPoint primaryEndPoint, STUNSendMessageDelegate primarySend, IPEndPoint secondaryEndPoint, STUNSendMessageDelegate secondarySend ) : NUnit.Framework
primaryEndPoint System.Net.IPEndPoint
primarySend STUNSendMessageDelegate
secondaryEndPoint System.Net.IPEndPoint
secondarySend STUNSendMessageDelegate
return NUnit.Framework
        public STUNServer(IPEndPoint primaryEndPoint, STUNSendMessageDelegate primarySend, IPEndPoint secondaryEndPoint, STUNSendMessageDelegate secondarySend)
        {
            m_primaryEndPoint = primaryEndPoint;
            m_primarySend = primarySend;
            m_secondaryEndPoint = secondaryEndPoint;
            m_secondarySend = secondarySend;

            m_primaryDiffPortSocket = NetServices.CreateRandomUDPListener(m_primaryEndPoint.Address, out m_primaryDiffPortEndPoint);
            m_secondaryDiffPortSocket = NetServices.CreateRandomUDPListener(m_secondaryEndPoint.Address, out m_secondaryDiffPortEndPoint);

            logger.Debug("STUN Server additional sockets, primary=" + IPSocket.GetSocketString(m_primaryDiffPortEndPoint) + ", secondary=" + IPSocket.GetSocketString(m_secondaryDiffPortEndPoint) + ".");
        }