Internet Direct (Indy)
Home
PreviousUpNext
TIdIOHandler.ReadLnSplit Method

Reads a line from the Indy buffer.

Pascal
function ReadLnSplit(
    var AWasSplit: Boolean; 
    ATerminator: string = LF; 
    ATimeout: Integer = IdTimeoutDefault; 
    AMaxLineLength: Integer = -1
): string;
Parameters 
Description 
AWasSplit 
Indicates the line was split based on the line length.
 
ATerminator 
End-of-line termination character or characters.
 
ATimeout 
Time-out in milliseconds.
 
AMaxLineLength 
Maximum length allowed for the line read from the IOHandler. 

String - Line read from the buffer.

ReadLnSplit is a String function used to read a line of text from the IOHandler. ReadLnSplit allows the text line to be separated into additional lines when the line length exceeds the value in AMaxLineLength. 

ReadLnSplit temporarily overrides the value in MaxLineAction to prevent an exception from being raised when the line length exceeds AMaxLineLength. 

AWasSplit is updated to indicate the line length exceeded the value in AMaxLineLength. 

ATerminator is an optional parameter that indicates the end-of-line symbol for the client or protocol. When ATerminator is not specified or contains an empty string, LF is used as the default terminator. If data is expected and you do not need a custom end-of-line symbol, you can use the default ATerminator value or one of the following: 

 

Char 
Description 
LF 
Line Feed (Decimal 10) 
CR 
Carriage Return (Decimal 13) 
EOL 
End-of-line (Carriage Return + Line Feed) 

 

ATimeout allows the client to use a custom timeout value to change the number of milliseconds to wait for a response from the peer connection before a time-out occurs. The default value for ATimeout is IdTimeoutDefault

AMaxLineLength is used to indictate that ReadLn cannot accept a string with a length in excess of the parameter value. The default value for AMaxLineLength is -1, and indicates that the value in the MaxLineLength property should be used in ReadLn

ReadLnSplit calls ReadLn to read data from the buffer for IOHandler.

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.