Re: Doubtful stuff in function TIdIOHandler.ReadLn

Giganews Newsgroups
Subject: Re: Doubtful stuff in function TIdIOHandler.ReadLn
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Tue, 23 Aug 2005

"Tobias Giesen" <tobi…@tgtools.de> wrote in message
news:038DAC0F74D7E240tobi…@tgtools.de...

> If this parameter has then default value, IdTimeoutDefault, then
> the function behaves identical to IdTimeoutInfinite.

Not exactly.  If ATimeout is IdTimeoutDefault then the ReadTimeout property
is used.  ReadTimeout is 0 by default, which then causes ATimeout to become
IdTimeoutInfinite.  If you change the ReadTimeout to another value then
IdTimeoutInfinite will not be used.

> As a quick solution, I am adding this at the beginning of
> TIdIOHandler.ReadLn:

There is no need for that.  ReadLn() calls ReadFromSource(), which already
handles that.

Gambit

Replies

In response to

Doubtful stuff in function TIdIOHandler.ReadLn posted by Tobias Giesen on Tue, 23 Aug 2005