I am working on an application that wants me to read data from the Ethernet port at 15 MB/sec. The server is sending a data in packets of 804 Bytes each.
When I try to read 1000 packets one after the other using recvfrom() it throws SOCKET_ERROR after every 20-25 packets. This is probably happening because the data is coming at slower speed and we are not putting any time delay between two consecutive recvfrom() calls.
Then we cross verified our observation by introducing a delay of 1 m sec in between two calls of recvfrom(). It never throws errors, probably because the data is always ready in the buffer (in this case).
But in actual our requirement we can't put such a big delay in-between consecutive recvfrom() calls. The we tried setting the recieve timeout for recvfrom() using select() function. It did not help probably because sockets by default are non-blocking in nature.Kindly let us know what we can do in this regard:
Will converting my socket from non-blocking to blocking help? If yes, how can i do this?
Anybody Please help .. I am stuck very badly..