UDP socket on Universal Windows not receiving data
<p>I have a WPF application that receives data through a UDP socket. Now I need to port it to Universal Windows Platform, but the socket does not receive the incoming data.</p>

<pre><code>private void Init()
{
    socket = new Socket(SocketType.Dgram, ProtocolType.Udp);
    socket.Bind(new IPEndPoint(IPAddress.Parse("192.168.0.1"), 55156));

    socketAsyncArgs = new SocketAsyncEventArgs();
    buffer = new byte[4096];
    socketAsyncArgs.SetBuffer(buffer, 0, buffer.Length);
    socketAsyncArgs.Completed += Receive_Completed;
}

private void Receive()
{
    bool isPending = socket.ReceiveAsync(socketAsyncArgs);
    if ( ! isPending)
        Receive_Completed(socket, socketAsyncArgs);
}
</code></pre>

<p>The <code>Receive_Completed</code> method is never called. The same code works well in a WPF project. I used WireShark to verify the packets are coming. I also tried using <code>Windows.Networking.Sockets.DatagramSocket</code> with the same result - the socket does not receive any data.</p>