Re: UDP question
- From: Jack <junw2000@xxxxxxxxx>
- Date: Fri, 14 Sep 2007 00:36:30 -0700
On Sep 13, 11:05 pm, David Schwartz <dav...@xxxxxxxxxxxxx> wrote:
On Sep 12, 11:37 pm, Jack <junw2...@xxxxxxxxx> wrote:
I wrote a simple UDP client using sendto and a simple UDP server using
recvfrom.
When I run both the client and server on the same machine, about 25
percent UDP messages are dropped. If I run the client and server on
different machines, only a few UDP messages are dropped.
What is the problem?
When you detect packet loss, you need to slow down. The problem is
that your code has no transmit pacing. On different machines, the
network paces transmissions for you to some extent.
DS
The UDP client is very simple. It is just sendto within a for loop,
like:
for(int i =0; i < 1000; i++)
{
sendto();
}
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?
Thanks.
.
- Follow-Ups:
- Re: UDP question
- From: David Schwartz
- Re: UDP question
- References:
- UDP question
- From: Jack
- Re: UDP question
- From: David Schwartz
- 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: Re: UDP question
- Index(es):
Relevant Pages
|