Home » questions » recvfrom():how to receive multiple UDP packets.?

recvfrom():how to receive multiple UDP packets.?

2006-07-31 07:31:10, Category: Programming & Design
recvfrom() call reads only one packet from the incoming buffer at a time. Is there any API to receive all the packets present in the incoming buffer of the ethernet driver? I wish to receive packets at 80 Mbps but i am losing packets between two recvfrom calls. My thread is just stripping the header and writing the packet into another buffer using memcpy before returning to the recvfrom api call. I doubt because the recvfrom api first goes from user space to kernel space, reads the data there and then return back to the user space..so all this has to be done for receiving a single packet. So, is there a way so that i can issue only 1 api to read all the available packets in the incoming buffer. So, it will reduce the overhead of issuing "n" recvfrom() calls to receive "n" packets by issuing only 1 call from userspace. so, is there any api to receive all the available packets in incoming buffer ??? Thanks, Aakash

Answers

  1. Rez

    On 2006-08-04 08:05:56


    check microsoft.com