Re: Losing UDP packets with MFC Sockets
- From: "Scott McPhillips [MVP]" <org-dot-mvps-at-scottmcp>
- Date: Wed, 13 Apr 2005 18:58:59 -0500
Vicent Soler wrote:
Hi all,
We are developing a tool which uses UDP packets to receive data from a UDP Server. The problem we have found is that some UDP packets are being lost when the PC's CPU is near 100% and we think that this problem is related to the Window's input buffer.
Any suggestion to solve this problem!! Is there any way to change the input buffer size of the socket and store the received packet while the PC is processing other data? Should we use threads to extract data from sockets?
We are really worried about this problem because we can not lose so much packets as we do.
Using more than one port, cuould solve the problem?
Thanks in advance,
Vicent
I have seen the same problem with short packets (512 bytes) at high data rates. Two things improved it a lot. Use a thread for the socket with the thread priority set higher than normal. Turn off the Win XP "eye candy" in favor of the traditional Windows appearance.
You can change the buffer size with SetSockOpt. I don't know if it will matter.
-- Scott McPhillips [VC++ MVP]
.
- Follow-Ups:
- Re: Losing UDP packets with MFC Sockets
- From: Vicent Soler
- Re: Losing UDP packets with MFC Sockets
- References:
- Losing UDP packets with MFC Sockets
- From: Vicent Soler
- Losing UDP packets with MFC Sockets
- Prev by Date: Re: Losing UDP packets with MFC Sockets
- Next by Date: Re: why microsoft choose mfc rather than wtl?
- Previous by thread: Re: Losing UDP packets with MFC Sockets
- Next by thread: Re: Losing UDP packets with MFC Sockets
- Index(es):
Relevant Pages
|