Topic Path: Symbol Reference > Classes > TIdIOHandler Class > TIdIOHandler Methods > ReadLnWait Method
TIdIOHandler.ReadLnWait Method

Waits for a line of text to be read from the IOHandler.

function ReadLnWait(
    AFailCount: Integer = MaxInt
): string; virtual;
Number of attempts to make in reading the line of text. 

string - Line of text read from the IOHandler.

ReadLnWait is a string function used read a line of text from the IOHandler. ReadLnWait attempts to read a non-blank string value using ReadLn

If data is not available or a timeout occurs, ReadLnWait will retry the operation until the number of attempts in AFailCount have been exceeded. The default value is MaxInt, and essentially indicates that ReadLnWait should wait until a non-blank line is read from the IOHandler. 

Set the value in ReadTimeout to indicate the number of milliseconds to wait for each read before a timeout occurs ans the attempt fails. 

Use ReadLnTimedout to determine if the read failed due to a timeout condition.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.