setting timeout with TIdHTTP

Giganews Newsgroups
Subject:setting timeout with TIdHTTP
Posted by: Ron (nospam@please)
Date:Mon, 30 Jan 2006

D7, Indy 9.00.18

If i have the following code:

  FHTTP := TIdHTTP.Create(nil);
  FHTTP.ConnectTimeout := 2000;

.....

    vException := False;
    try
      vResult := FHTTP.Get(FURL);
    except
      on E: Exception do
      begin
        vException := True;
      end
    end;

Does it always return after 2 seconds passed, regardless of internet
connectivity and target URL availability?

Thanks,
Ron.

Replies