Internet Direct (Indy)
Home
PreviousUpNext
TIdIOHandler.InputLn Method

Reads a line of data from the connection.

Pascal
function InputLn(
    const AMask: String = ''; 
    AEcho: Boolean = True; 
    ATabWidth: Integer = 8; 
    AMaxLineLength: Integer = -1
): String; virtual;
Parameters 
Description 
AMask 
Character to echo instead of the value read from the connection.
 
AEcho 
Indicates if echoing is enabled.
 
ATabWidth 
Number of space characters to use to represent a TAB.
 
AMaxLineLength 
Maximum line length allowed for data read from the connection. 

String - Values read from the IOHandler connection.

InputLn is a virtual String function used to read a single line of data from the connection for the IOHandler. 

AMaxLineLength indicates the maximum line length allowed for data read from the connection. When AMaxLineLength contains -1, the value in MaxLineLength is used for the maximum line length. 

InputLn reads data one character at a time from the connection for the IOHandler, and accumulates values read from the connection as the return value for the function. Trailing CR and LF characters are truncated from the return value. 

When AEcho is True, values read from the connection are written back to the connection, with special handling provided for the TAB and BACKSPACE characters. 

TAB characters are echoed as a string of CHAR32 values with the length indicated in ATabWidth when ATabWidth contains a positive non-zero value. 

BACKSPACE characters cause the last value read from the connection to be removed from the accumulated return value. When AEcho is True, the BACKSPACE character is echoed with additional CHAR32 and BACKSPACE values. 

When AMask is specified, the AMask string is sent to the peer for each character received instead of the actual characters read from the connection. 

InputLn is useful when obtaining data from a user such as username, passwords, and commands.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.