Internet Direct (Indy) Version 9.0.2 Beta
|
function ReadLn(const ATerminator: string; const ATimeout: integer): string; virtual;
The optional ATerminator parameter indicates the end-of-line symbol for the particular protocol. If data is expected, and you do not need a custom end-of-line symbol, you can use the default ATerminator value (#0). ATerminator values include:
If there is no terminator (ATerminator) in the buffer, ReadLn will read more bytes from the TCP stack through the ReadFromStack method.
Use a custom time-out (ATimeout) 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 IdTimeoutInfinite. See IdGlobal.pas for more information on constant timeout values.
ReadLn will return an empty string ('') if the peer connection is prematurely closed or a time-out occurs. When a timeout condition occurs in ReadLn, the ReadLnTimedOut property is set to True.