[DUG] Indy ConnectTimeout/ReadTimeout recomendations
Ross Levis
ross at stationplaylist.com
Mon Dec 13 17:01:50 NZDT 2010
The routine needs to establish if the URL is valid before proceeding. If
it's not valid then it needs to query a website for a new URL and store that
in a database.
Most of the time the URL never changes, but it can do occasionally. It's
not so important to update the URL this time around if there is a slow
connection. It will be checked again sometime.
I think a connect timeout should indicate a valid URL as this means winsock
didn't produce a socket error, which likely means the web server does exist
but is too busy to respond, and we'll assume it's still valid.
I still need to consider suitable timeout settings. The faster the better.
Ross.
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of Jolyon Smith
Sent: Monday, 13 December 2010 4:28 PM
To: 'NZ Borland Developers Group - Delphi List'
Subject: Re: [DUG] Indy ConnectTimeout/ReadTimeout recomendations
The question is how quickly the web site is likely to respond, not how fat
your pipe connecting to it is. 3 seconds could easily be nowhere near long
enough if the server is under heavy load.
You say you don't want to "delay the routine" if the web site is down, but
you presumably don't wish to abort the routine just because the web site is
a bit slow to respond.
Depending on what the potentially-delayed-routine in question is doing,
perhaps you could do your URL check in a background thread ?
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of Ross Levis
Sent: Monday, 13 December 2010 16:19
To: 'NZ Borland Developers Group - Delphi List'
Subject: [DUG] Indy ConnectTimeout/ReadTimeout recomendations
I'm after minimum recommendations for ConnectTimeout and ReadTimeout for
connecting to an HTTP URL. Assuming a DSL internet connection, could these
be say 3 seconds each and not likely to abort too early in most cases?
I'm executing HTTP.Head to determine if a URL is valid but I don't want to
delay the routine too much if the website is down.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20101213/aa73ec32/attachment-0001.html
More information about the Delphi
mailing list