Re: UDP question



On Sep 14, 12:36 am, Jack <junw2...@xxxxxxxxx> wrote:

The UDP client is very simple. It is just sendto within a for loop,
like:
for(int i =0; i < 1000; i++)
{
sendto();

}

Umm, yeah. Where's the packet loss detection code? Where's the
transmit pacing?

Is the sending rate of running the UDP client and server on the same
machine different from that of running the UDP client and server on
two different machines?

That really depends upon how you define "sending rate". But your code
makes no effort to control the sending rate and what it gets is going
to be completely unpredictable.

If you are going to use UDP, you need to implement all the features of
TCP that you need. To send large numbers of packets in a small amount
of time, you need transmit pacing, which UDP does not provide and
neither do you.

DS

.