Hi,
I have a problem coding a UDP Server/client. The server needs to send big
amounts of data over UDP. The problem however is that you can't send as fast
as you like. (All packets will be dropped due to the fact that a router
can't handle the huge number of packets (most likely the first one the
packets hit)).
To fix this problem you need to increase/decrease the speed according to
packetloss.
The problem I'm facing at the moment is; When I need to wait less then 1 ms
in between sending 2 packets. At the moment I'm using Thread.Sleep to time
the packets. Which is working quite nicely won't go faster then ~1.4
mBytes/s depending on packet size while testing.
Is there a simple way to fix this without using a busy waiting or do I need
to use p/invoke (To get to usleep or something).
(you can't resolve this by changing packet size due to the fact that most
routers have a max MTU length!)
Thanks, Matthijs