Internet Direct (Indy)
Home
PreviousUpNext
TIdTCPStream.ReadLnSplit@Boolean@string@Integer@Integer

Reads a line from the stream.

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 stream. 

string - Line read from the stream.

ReadLnSplit is a String function used to read a line of text from the stream descendant. ReadLnSplit allows long text line to be separated into additional lines when the line length exceeds the value in 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: 

 

Terminator 
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 stream 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 uses the IOHandler for the Connection ReadLn to read data from the buffer for IOHandler. 

ReadLnSplit is used in message decoders to read long "lines", such as in binary-encoded attachments, where the whole attachment is just one continuous line with data for the attchment.

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.