Does the dwSendTimeout parameter of the WinHttpSetTimeouts function
refer to the time taken to send the complete request, or to continuous
idle time whilst sending the request?
The way the docs are written suggests the former, but that wouldn't be
very useful behaviour, especially if I had a very big file I wanted to
POST down a very slow connection....
Anyone know before I go to the trouble of testing this. :) (If only
I had the source I could answer this question in 5 seconds)
I'm using winhhtp5 on NT 4 and 2000 if it matters.
doug.
At WinHTTP's Win32 API level, there is no single timeout setting that
applies to the entire request.
Regards,
Stephen Sulzer
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
"doug mansell" <doug_m...@hotmail.com> wrote in message
news:81202a1.02060...@posting.google.com...
Hmm... what is the size of a block of data? :)
Also, the documentation (at least in my version of the SDK) says call
WinHttpSetTimeouts with a handle returned by WinHttpOpenRequest, but
the example shows it being called with a handle returned by
WinHttpOpen. I'm assuming the example to be correct because two of
the timeout parameters refer to events which occur before
WinHttpOpenRequest.
thanks,
doug.
"Stephen Sulzer \(Microsoft\)" <ssu...@online.microsoft.com> wrote in message news:<OV58AJfDCHA.2712@tkmsftngp04>...
4 megabytes. WinHTTP 5.0 will break request payloads up into 4MB chunks for
Winsock and the send timeout applies to sending each chunk.
It is OK to set the timeouts on the session (the handle created by
WinHttpOpen) instead of the request handle, as long as the timeouts are set
before the request handle is created. When the request handle is created by
WinHttpOpenRequest, it inherits the timeout settings from the session.
> I'm assuming the example to be correct because two of
> the timeout parameters refer to events which occur before
> WinHttpOpenRequest.
Actually, WinHTTP 5.0 delays doing any network I/O until WinHttpSendRequest.
Resolving the target server name, establishing a TCP connection and sending
the HTTP request all happen in response to WinHttpSendRequest.
WinHttpConnect does not do any network I/O, it just sets up some internal
state.
Regards,
Stephen Sulzer
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
"doug mansell" <doug_m...@hotmail.com> wrote in message
news:81202a1.02062...@posting.google.com...
I see.
Ok, one last thing about WinHttpSetTimeouts:
In my application (sending large requests) I had to increase
dwSendTimeout from the default 30 seconds. Somewhat surprisingly, I
also had to increase dwReceiveTimeout. Does the Receive Timeout start
ticking at the same as the Send Timeout?
The docs could be a little clearer on this. :)
thanks,
doug.