Article View: borland.public.cppbuilder.internet.socket
Article #16Re: Missed UDP packets
From: Dave K.
Date: Mon, 28 Jul 2008 03:22
Date: Mon, 28 Jul 2008 03:22
40 lines
2309 bytes
2309 bytes
Colin, thanks for the suggestion. If you could post your code I would greatly appreciate it. Thanks Dave Colin B Maharaj wrote: > Dave, what I do is to create a circular buffer > then take the entire UDP packet and place it in this > circular buffer. > > This the job of the UDP Indy event when a pack arrives. > That is the ONLY thing that the UDP packet availability > event does. > > Now the buffer is a FIFO buffer, with synchronization when > reading and writing. > > A next thread then consumes the buffer contents. While it consumes > the contents, more packets can be written to the buffer at the same > time in the read event handler. > > Will post code on demand.... > > > > Dave K. wrote: >> Hello, >> I am using the Indy UDP server component in an application, and am >> experiencing quite a few missed packets in circumstances where the >> UDPRead method isn't called quickly enough after a packet arrives. For >> example, if I pause the program briefly in the debugger packets are >> invariably lost. This also happens in normal operation if there is any >> delay in responding to incoming data. Is this normal behavior for the >> UDP server? Is data lost when the Read method is not called before >> more data arrives? How can the problem be resolved, or can it be? >> >> Thanks >> Dave
Technical Details
Message-ID:
<488d3b78@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<488b52f1$1@newsgroups.borland.com> <488bc2d2$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fe1f171b8b3e63a7 X-Google-Attributes: gid11508e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Sun, 27 Jul 2008 23:22:31 -0400 From: "Dave K." <dsk@nospam.com> User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Missed UDP packets References: <488b52f1$1@newsgroups.borland.com> <488bc2d2$1@newsgroups.borland.com> In-Reply-To: <488bc2d2$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.36.6.61 Message-ID: <488d3b78@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1217215352 24.36.6.61 (27 Jul 2008 20:22:32 -0700) Lines: 40 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail