internal void Connect() { //Debug.Log("Establishing UDP connection"); _cryptState = new CryptState { CryptSetup = _mumbleClient.CryptSetup }; _udpClient.Connect(_host); // I believe that I need to enable dontfragment in order to make // sure that all packets received are received as discreet datagrams _udpClient.DontFragment = true; _isConnected = true; _udpTimer = new System.Timers.Timer(MumbleConstants.PING_INTERVAL_MS); _udpTimer.Elapsed += RunPing; _udpTimer.Enabled = true; SendPing(); // Before starting our thread, set running to true _running = true; _receiveThread = new Thread(ReceiveUDP) { IsBackground = true }; _receiveThread.Start(); }
internal void Connect() { //Debug.Log("Establishing UDP connection"); _cryptState = new CryptState(); _cryptState.CryptSetup = _mumbleClient.CryptSetup; _udpClient.Connect(_host); _isConnected = true; _udpTimer = new Timer(MumbleConstants.PING_INTERVAL_MS); _udpTimer.Elapsed += RunPing; _udpTimer.Enabled = true; SendPing(); _udpClient.BeginReceive(ReceiveUdpMessage, null); }