Re: Losing UDP packets with MFC Sockets
- From: Vicent Soler <VicentSoler@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 14 Apr 2005 01:15:03 -0700
Just two questions:
1.- The buffer size allows to store temporarly more than 1 packet? Or it is
related to the maximum packet size?
2.- About the thread: should I use threads for extracting data from input
buffer after OnReceive notification?
Thanks in advance
Vicent
"Scott McPhillips [MVP]" wrote:
> 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: Scott McPhillips [MVP]
- Re: Losing UDP packets with MFC Sockets
- From: Gopalakrishnan
- Re: Losing UDP packets with MFC Sockets
- References:
- Losing UDP packets with MFC Sockets
- From: Vicent Soler
- Re: Losing UDP packets with MFC Sockets
- From: Scott McPhillips [MVP]
- Losing UDP packets with MFC Sockets
- Prev by Date: Re: WM_MOUSEWHEEL problem!
- Next by Date: Re: Losing UDP packets with MFC Sockets
- Previous by thread: Re: Losing UDP packets with MFC Sockets
- Next by thread: Re: Losing UDP packets with MFC Sockets
- Index(es):
Relevant Pages
|