🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

EldReadTimeOut Process Stopped

#3919
From: Colin B Maharaj
Date: Thu, 26 May 2005 11:21
44 lines
2110 bytes
Hi folks, I have a TCP Client Connected to a TCP Server (Indy 9.0.18) 
and now I want to place reading of the Client Data in a Thread. except I 
get a EldReadTimeOut error and the process is then stopped. My code is 
taking all the client data and placing it in a Memo.

Net1 is a data module with a TcpClient I call Client1....
Any help will be appreeciated.


//---------------------------------------------------------------------------
AnsiString Data;
TTcpClientReader * TcpReader1;

__fastcall TTcpClientReader::TTcpClientReader(bool CreateSuspended)
         : TThread(CreateSuspended)
{

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

void __fastcall TTcpClientReader::Execute()
{
   while (Net1->Client1->Connected() == true)
   {
     AnsiString A = Net1->Client1->CurrentReadBuffer();
     if (A.Length() > 0)
     {
       Data = Net1->Client1->ReadLn();
       Synchronize(UpdateCaption);
     }
     else
     {
       Sleep(25);
     }
   }

}

//---------------------------------------------------------------------------

  void __fastcall TTcpClientReader::UpdateCaption()
  {
    Form1->Memo1->Lines->Add(Data);
  }
Technical Details
Message-ID: <4295b153@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,e433419ab121c6a5,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 26 May 2005 07:21:48 -0400
From: Colin B Maharaj <noreply@myhost.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a4) Gecko/20040927
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: EldReadTimeOut Process Stopped
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 201.238.79.168
Message-ID: <4295b153@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1117106515 201.238.79.168 (26 May 2005 04:21:55 -0700)
Lines: 46
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail