Article View: borland.public.cppbuilder.internet.socket
Article #15Re: Missed UDP packets
From: Colin B Maharaj
Date: Sun, 27 Jul 2008 00:35
Date: Sun, 27 Jul 2008 00:35
32 lines
2187 bytes
2187 bytes
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:
<488bc2d2$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<488b52f1$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: Sat, 26 Jul 2008 20:35:31 -0400 From: Colin B Maharaj <noreply@myhost.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> In-Reply-To: <488b52f1$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080726-1, 07/26/2008), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 190.58.103.195 Message-ID: <488bc2d2$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1217118930 190.58.103.195 (26 Jul 2008 17:35:30 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail