🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TCPClient Indy

#5313
From: MrT
Date: Thu, 23 Sep 2004 01:33
44 lines
1805 bytes
Hi:

  Small problem.

ReadLn

Reads a line from the Indy buffer.

function ReadLn(ATerminator: string; const ATimeout: Integer; 
AMaxLineLength: Integer): string; virtual;

Parameters

ATerminator: string = LF

End-of-line termination character or characters.

const ATimeout: Integer = IdTimeoutDefault

Time-out in milliseconds. Default value IdTimeoutInfinite.

AMaxLineLength: Integer = -1


My problem code:

    try
      {
       TCPClient->WriteLn("BACKUPCOPYGDB");
       s = TCPClient->ReadLn("", 5000, -1);
       R1 = StrToInt(s);
       R1 = floor(R1/Key);
       R2 = IntToStr(R1);
       TCPClient->WriteLn(R2);
       s = TCPClient->ReadLn("", 5000, -1); <--------
       if (Trim(s) != "Success")

This is of late returning failure. With break at <-- above, the delay 
allows the TCPClient to receive the message.
Just started doing this recently.

Seems odd.

Any suggestions?
Technical Details
Message-ID: <4152287f@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!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,9d2a5f2c88afc016,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 22 Sep 2004 21:33:29 -0400
From: MrT <contact@heat-mi.org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: TCPClient Indy
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 64.108.158.197
Message-ID: <4152287f@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1095903359 64.108.158.197 (22 Sep 2004 18:35:59 -0700)
Lines: 45
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail