UDP missing packets

405 Views Asked by At

The problem: UDP packets are missing.

How could I capture every single UDP packet that is hitting the port?

I want to put received packet on the queue for preprocessing in the background and continue capturing new UDP packets without a single UDP packet loss?

public void Main() 
{
    Socket client = new(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);

    ....

    Console.WriteLine("Collecting data..");

    while (true)
    {
        CaptureUDPPacket(client, _ep);
    }
}

What is the best way to implement this feature?

Best regards!

0

There are 0 best solutions below