Board index » delphi » TIdHTTP Timeout

TIdHTTP Timeout


2006-05-27 04:28:14 AM
delphi93
I have a CGI program on my web site which I run and pass some parameters in
the URL.
I am using a TIdHTTP component to run the program with the passed
parameters:
TIdHTTP.Get('mysite.com/cgiprog.exe/function
Since the page returned by the GET operation is not used and it is no a big
problem if the function fails, is there a way I can send the GET request and
just continue without waiting for the returned page?
I am using Indy 10.0.52.
Thanks,
-Johnnie
 
 

Re:TIdHTTP Timeout

"Johnnie Norsworthy" <XXXX@XXXXX.COM>writes
Quote
Since the page returned by the GET operation is not used and it is no
a big problem if the function fails, is there a way I can send the GET
request and just continue without waiting for the returned page?
Indy is a blocking library. All of its socket operations are synchronous.
The only way to do an asynchronous Get() is to do the Get() in a separate
thread.
Also, since you don't want the website's content, you might also consider
deriving a class from TStream that overrides the Write() method with an
empty body. This way, any data that is written to the stream will be
discarded and not take up any memory at all. You can then pass this stream
to the overloaded version of Get() that has a TStream parameter for
outputted data.
Gambit
 

Re:TIdHTTP Timeout

"Remy Lebeau (TeamB)" <XXXX@XXXXX.COM>writes
Quote
Indy is a blocking library. All of its socket operations are synchronous.
The only way to do an asynchronous Get() is to do the Get() in a separate
thread.

Also, since you don't want the website's content, you might also consider
deriving a class from TStream that overrides the Write() method with an
empty body. This way, any data that is written to the stream will be
discarded and not take up any memory at all. You can then pass this
stream
to the overloaded version of Get() that has a TStream parameter for
outputted data.
Thanks very much for this information. I don't know if I will bother with
threading or just live with the brief pause for the Get() operation to
complete.
-Johnnie