-
November 8th, 2011, 06:14 AM
#1
Timeout for HTTPSendRequest
I am calling HttpSendRequest() to get response header from a url. But HttpSendRequest takes more than 2 seconds to return. Why is this so? Is there anyway I can set a timeout for this? I tried SetInternetOption() using INTERNET_OPTION_RECEIVE_TIMEOUT after calling HttpOpenRequest() but that did not work. Thanks in advance..
-
November 8th, 2011, 11:27 AM
#2
Re: Timeout for HTTPSendRequest
Try calling InternetSetOption before calling HttpSendRequest.
-
November 8th, 2011, 11:37 AM
#3
Re: Timeout for HTTPSendRequest
You should set:
INTERNET_OPTION_RECEIVE_TIMEOUT
INTERNET_OPTION_SEND_TIMEOUT
INTERNET_OPTION_CONNECT_TIMEOUT
If you set all three to 2 seconds, then the entire operation could take up to 6 seconds.
gg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|