Unable to receive UDP packets <p>I'm attempting to send and receive UDP packets from the same machine using two separate programs but so far I've not been able to receive anything. I've attempted completely turning off my firewall and that still hasn't worked.</p> <p>Sending program</p> <pre><code>var sender = new UdpClient(Dns.GetHostName(), 2055); var data = new byte[] { 0, 1, 2, 3, 4, 5 }; sender.Send(data, data.Length); </code></pre> <p>Receiving program</p> <pre><code>var receiver = new UdpClient(2055); var endPoint = new IPEndPoint(IPAddress.Any, 2055); var data = receiver.Receive(ref endPoint); System.Console.WriteLine("Data received"); </code></pre> <p>I've even copy and pasted code from this tutorial <a href="http://www.codeproject.com/Articles/10649/An-Introduction-to-Socket-Programming-in-NET-using" rel="nofollow">http://www.codeproject.com/Articles/10649/An-Introduction-to-Socket-Programming-in-NET-using</a> and still had no success.</p>