Re: UDP question
- From: David Schwartz <davids@xxxxxxxxxxxxx>
- Date: Fri, 14 Sep 2007 15:51:20 -0700
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
.
- References:
- UDP question
- From: Jack
- Re: UDP question
- From: David Schwartz
- Re: UDP question
- From: Jack
- UDP question
- Prev by Date: Re: writing drivers using C++
- Next by Date: Re: writing drivers using C++
- Previous by thread: Re: UDP question
- Next by thread: error on loading the module
- Index(es):