Re: Losing UDP packets with MFC Sockets



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]
>
>
.



Relevant Pages

  • Re: Socket switch delay
    ... The server uses blocking sockets just because I am also using Overlapped IO ... structures to send the packets. ... The reason I am using a 0 bytes send buffer in my socket (i.e. ...
    (microsoft.public.win32.programmer.networks)
  • netstat -s output: "packets pruned" and "packets collapsed"
    ... 4087 packets pruned from receive queue because of socket buffer ... 362332 active connections openings ...
    (comp.os.linux.networking)
  • Re: Datagram Socket Speed Problem
    ... I'd say that there's not a single thing wrong with the socket. ... When the buffer is full (because you're trying to send faster than the ... network bandwidth will allow), it tosses the packets. ... > The receiver program start receiving packets... ...
    (microsoft.public.dotnet.framework.compactframework)
  • Windows 2003SP2 Socket Sends are much slower than Windows XP on my
    ... written to the socket is 64k I get max performance independently of the OS. ... If I start to reduce the buffer size down to 1k the performance on WinXP ... After evaluating a wireshark network trace, the packets sent from the ...
    (microsoft.public.win32.programmer.networks)
  • Re: In-tree version of new FireWire drivers available
    ... Just to recap, the dual buffer receive mode, as described in section ... quadlet aligned amount of header data can be appended into one buffer ... *either* the header buffer or the payload buffer fills up. ... enough to hold headers for all the packets it takes to fill up the ...
    (Linux-Kernel)