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

Reads a line from the Indy buffer.

function ReadLnSplit(
    var AWasSplit: Boolean; 
    ATerminator: string = LF; 
    ATimeout: Integer = IdTimeoutDefault; 
    AMaxLineLength: Integer = -1
): string;
Indicates the line was split based on the line length.
End-of-line termination character or characters.
Time-out in milliseconds.
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: 


Line Feed (Decimal 10) 
Carriage Return (Decimal 13) 
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.

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