Quantcast
Channel: Delphi – The Wiert Corner – irregular stream of stuff
Viewing all articles
Browse latest Browse all 1445

Soap Delphi Client end with a timeout for a 1MB call – Stack Overflow

$
0
0

This was a change between IE6 and IE7 on the default time-out decreasing from 3600 seconds to 30 seconds: [WayBack] Soap Delphi Client end with a timeout for a 1MB call – Stack Overflow.

If you want to increase the timeout, then use InternetSetOption. You can get the current value using InternetQueryOption.

In Delphi, THTTPReqResp.Send supports this by setting the various time out options right after creating the request:

    Request := HttpOpenRequest(FInetConnect, 'POST', PChar(FURLSite), nil,
                               nil, nil, Flags, 0{Integer(Self)});
    Check(not Assigned(Request));

    { Timeouts }
    if FConnectTimeout > 0 then
      Check(not InternetSetOption(Request, INTERNET_OPTION_CONNECT_TIMEOUT, Pointer(@FConnectTimeout), SizeOf(FConnectTimeout)));
    if FSendTimeout > 0 then
      Check(not InternetSetOption(Request, INTERNET_OPTION_SEND_TIMEOUT, Pointer(@FSendTimeout), SizeOf(FSendTimeout)));
    if FReceiveTimeout > 0 then
      Check(not InternetSetOption(Request, INTERNET_OPTION_RECEIVE_TIMEOUT, Pointer(@FReceiveTimeout), SizeOf(FReceiveTimeout)));

Related:

–jeroen


Viewing all articles
Browse latest Browse all 1445

Trending Articles