Re: Problem sending data via the TIdHTTP client control

Giganews Newsgroups
Subject: Re: Problem sending data via the TIdHTTP client control
Posted by:  Remy Lebeau \(TeamB\) (no.spam@no.spam.com)
Date: Wed, 9 Jul 2008

"Ian" <i…@gtl.biz> wrote in message news:FED8873EB75AE340i…@gtl.biz...

> The problem I have is when the hardware or test app isn't running.
> I get as far as the "Post" command but then it waits/hangs until I
> reply to the post.

If the target of the post is not running at all, you should be getting an
exception since the connection cannot be established.  If it is running but
not responding, then yes, Post() will wait until the reply is actually sent.
Indy uses infinite timeouts by default.  If you want the reading to time out
after awhile, then set the ReadTimeout property to the desired interval, in
millisconds.

> Will there be a timeout at some point and if so can it be configured ?

See above.

> Is an event fired to say the post failed ?

No events.  But if the reading times out, or the server actively sends an
error reply, then an exception will be raised.

Gambit

Replies

In response to

Problem sending data via the TIdHTTP client control posted by Ian on Tue, 8 Jul 2008