private void ReceiveData() { while (true) { try { var anyIp = new IPEndPoint(IPAddress.Any, 0); var data = _client.Receive(ref anyIp); _receivedData.AddUDPPackage(data); } catch (Exception err) { Console.WriteLine(err.ToString()); } } }
private void ReceiveData() { while (true) { try { var anyIp = new IPEndPoint(IPAddress.Any, 0); var data = _client.Receive(ref anyIp); _receivedData.AddUDPPackage(data); } catch (Exception err) { Console.WriteLine(err.ToString()); } } }