BobM
2006-11-27 11:15:02 UTC
Hi,
I have an application that polls an ftp site for new files, and downloads
them as they appear. I use FtpFindFirstFile/InternetFindNextFile etc. to
enumerate every 60 seconds or so. I keep the ftp connection alive between
calls.
The first time I call FtpFindFirstFile, the response takes around 20
seconds, returning around 7000 - 8000 file names. The second time I call
FtpFindFirstFile 60 seconds later, the call returns 12002 timeout error after
30 seconds. I have tried setting both INTERNET_OPTION_CONNECT_TIMEOUT and
INTERNET_OPTION_RECEIVE_TIMEOUT to 60000ms, but the second call to
FtpFindFirstFile always times out after 30 seconds. The handle returned from
FtpFindFirstFile is closed correctly after each poll.
So, two questions...
1. Why would the second call always timeout?, and
2. How to I set the timeout for FtpFindFirstFile?
Thanks for any help!
I have an application that polls an ftp site for new files, and downloads
them as they appear. I use FtpFindFirstFile/InternetFindNextFile etc. to
enumerate every 60 seconds or so. I keep the ftp connection alive between
calls.
The first time I call FtpFindFirstFile, the response takes around 20
seconds, returning around 7000 - 8000 file names. The second time I call
FtpFindFirstFile 60 seconds later, the call returns 12002 timeout error after
30 seconds. I have tried setting both INTERNET_OPTION_CONNECT_TIMEOUT and
INTERNET_OPTION_RECEIVE_TIMEOUT to 60000ms, but the second call to
FtpFindFirstFile always times out after 30 seconds. The handle returned from
FtpFindFirstFile is closed correctly after each poll.
So, two questions...
1. Why would the second call always timeout?, and
2. How to I set the timeout for FtpFindFirstFile?
Thanks for any help!