🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #587

50% datagram drop with Indy

#587
From: syncopator
Date: Tue, 29 Jan 2008 21:29
39 lines
2383 bytes
I'm reading UDP datagrams from my camera over a closed network.  The camera 
is connected directly to my network card with a crossover cable and is on a 
static IP.  It sends 1000 datagrams per second, each one is 1.3 KB.  So it's 
roughly 13% of the 100T.
I'm using the UDP server from Indy 8, and receiving 50% of the packets.  The 
data is of the correct size and is valid.  I'm running the server in a high 
priority thread and have stripped away all the processing.
I originally implemented the code with FastNet, and I was getting 2% drops.
Any help would be greatly appreciated.

DWORD WINAPI ThreadFunc(LPVOID Param) {
   HANDLE MainWnd (Param);
   char Buffer[8192];
   int i,j, port, Len;
   while (true){
      Len=Form1->Server->ReceiveBuffer(Buffer,8192) ;
      dcnt++;
      pcnt+=Len;


__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
   DWORD Id;
   Thread= CreateThread(0,0,ThreadFunc,
      Form1->Handle,CREATE_SUSPENDED,&Id);
   if(!Thread){
      ShowMessage("Error Creating Thread");
   }

}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
    SetPriorityClass( Thread,REALTIME_PRIORITY_CLASS );
    ResumeThread(Thread);
    Timer1->Enabled = true;
}
Technical Details
Message-ID: <479f9abe$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,c7dd64338b3bbbf8,start
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "syncopator" <bobback@inbox.com>
From: "syncopator" <bobback@inbox.com>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: 50% datagram drop with Indy 
Date: Tue, 29 Jan 2008 13:29:37 -0800
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Original
X-Antivirus: avast! (VPS 080129-0, 01/29/2008), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 71.105.102.27
Message-ID: <479f9abe$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1201642174 71.105.102.27 (29 Jan 2008 13:29:34 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail