이것저것 찾아서 해보는데 영 안되네...
[링크 : http://forums.codeguru.com/...48863-How-to-set-timeout-value-for-CHttpFile-SendReqeust()]
[링크 : https://stackoverflow.com/questions/14986898/how-to-set-connection-timeout]
BOOL InternetSetOption( _In_ HINTERNET hInternet, _In_ DWORD dwOption, _In_ LPVOID lpBuffer, _In_ DWORD dwBufferLength ); |
[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa385114(v=vs.85).aspx]
INTERNET_OPTION_CONNECT_TIMEOUT 2 Sets or retrieves an unsigned long integer value that contains the time-out value, in milliseconds, to use for Internet connection requests. Setting this option to infinite (0xFFFFFFFF) will disable this timer. If a connection request takes longer than this time-out value, the request is canceled. When attempting to connect to multiple IP addresses for a single host (a multihome host), the timeout limit is cumulative for all of the IP addresses. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption. |
[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa385328(v=vs.85).aspx]
cIntSession.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 3000); |
2007년 글이긴 한데, 해당 함수 버그로 인해 정상 작동을 하지 않는다고?
[링크 : http://soonsin.com/80]
[링크 : https://social.msdn.microsoft.com/.../cinternetsession-openurl-timeout-problem?forum=vcmfcatl]
[링크 : https://support.microsoft.com/en-us/help/177190/bug-error-12019-when-calling-internetwritefile]
+
일단 헤더에서 찾은건 아래와 같은 timeout들인데 멀 설정하던 어떤 값을 하던 7초 정도 되어야 타임아웃 된다 ㅠㅠ
// timetout for HTTP socket pHttpFile->SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_SEND_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_RECEIVE_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_DATA_SEND_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_DATA_RECEIVE_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_LISTEN_TIMEOUT, 100); |
'Programming > C Win32 MFC' 카테고리의 다른 글
slider control / settic (0) | 2017.06.12 |
---|---|
mfc 파일 경로 얻기 (0) | 2017.05.30 |
win32 외부 프로그램 실행 (0) | 2017.05.29 |
cstring 'null' append 문제? (0) | 2017.05.18 |
MFC 시간측정(msec) (0) | 2017.04.18 |