Lazarus

Programming => Networking and Web Programming => Topic started by: vonskie on September 11, 2017, 08:48:49 am

Title: TFPHTTPClient what is the default timeout when doing a get?
Post by: vonskie on September 11, 2017, 08:48:49 am
TFPHTTPClient what is the default timeout when doing a get?

There is the IOtimeout option should I use it or just let it handle it the default way?









Title: Re: TFPHTTPClient what is the default timeout when doing a get?
Post by: vonskie on September 11, 2017, 08:59:15 am
Here is some info I found

Internet Explorer imposes a time-out limit for the server to return data. By default, the time-out limit is as follows:

Internet Explorer 4.0 and Internet Explorer 4.01   5 minutes
Internet Explorer 5.x and Internet Explorer 6.x   60 minutes
Internet Explorer 7 and Internet Explorer 8   60 minutes
When the server is experiencing a problem, Internet Explorer does not wait endlessly for the server to return data.

>>"Applications that use the WinINet API directly will experience the following ReceiveTimeout values:"
 
WinINet.dll version 4.x   5 minutes
WinINet.dll versions 5.x and 6.x   60 minutes
>>"WinINet.dll versions 7.x and 8.x   30 seconds" (So I am assuming pascal uses the wininet.dll in windows?)

You can locate the version of WinINet.dll in the %windir%\system32 directory.
Title: Re: TFPHTTPClient what is the default timeout when doing a get?
Post by: vonskie on September 11, 2017, 09:08:18 am
The problem is I need more than a 30 second wait time on the site I am getting the info from, because it is very busy at times. I increase it, but it seems to always fail around the 30 second mark as indicated above.

Title: Re: TFPHTTPClient what is the default timeout when doing a get?
Post by: Leledumbo on September 11, 2017, 08:09:51 pm
TFPHTTPClient what is the default timeout when doing a get?
Infinite: https://svn.freepascal.org/svn/fpc/tags/release_3_0_4/packages/fcl-web/src/base/fphttpclient.pp (line 1263)
There is the IOtimeout option should I use it or just let it handle it the default way?
Up to you.
Title: Re: TFPHTTPClient what is the default timeout when doing a get?
Post by: vonskie on September 12, 2017, 07:22:04 pm
Says infinite timeout on most platforms, does that include windows?

Title: Re: TFPHTTPClient what is the default timeout when doing a get?
Post by: Leledumbo on September 13, 2017, 05:57:04 pm
Says infinite timeout on most platforms, does that include windows?
Yes, or at least it should since it's a requirement for BSD sockets compatibility, which Winsock adheres to.
TinyPortal © 2005-2018