Bob Ryan
March 29th, 1999, 08:55 AM
I wrote an application using CInternetSession and CFtpConnection that works very well EXCEPT for when a PC with a network card is disconnected from the network. In this case, it times out eventually -- usually around 4 minutes - but during this lengthy time-out, the application appears hung to the user.
In my CFtpConnection, I'm setting the parameter for the timeout as in:
m_InetSession.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 3000);
I'm guessing I'm mixing concepts: connection timeouts != network timeouts. The question, then, is how can I test to see if a network connection is available prior to making the ftp connection? I tried using winsock2 to essentially ping a host - and ran into the same problem with lengthy timeouts.
Thank you,
Bob
In my CFtpConnection, I'm setting the parameter for the timeout as in:
m_InetSession.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 3000);
I'm guessing I'm mixing concepts: connection timeouts != network timeouts. The question, then, is how can I test to see if a network connection is available prior to making the ftp connection? I tried using winsock2 to essentially ping a host - and ran into the same problem with lengthy timeouts.
Thank you,
Bob