detecting the FTP connection break down.
-
Hello everyone!! i am transfering a large amount of data to a FTP server. in the process, if the FTP connection goes down, how can i detect the connection loss???
vijay.
-
Hello everyone!! i am transfering a large amount of data to a FTP server. in the process, if the FTP connection goes down, how can i detect the connection loss???
vijay.
-
Hi, Check socket handle - usually it's not valid any more. You didnt write what do you use.
----------- Mila
hello sir, sorry that i didnt write what i am actually doing. i am using
CFtpConnection
Class and usingPutfile()
function i am uploading the files to FTP server. but i want to know how to detect the connection loss (if any) while transfering the files. should i have to ping the server at certain time intervals or is there any other way of detecting the connection breakdown.???vijay.
-
hello sir, sorry that i didnt write what i am actually doing. i am using
CFtpConnection
Class and usingPutfile()
function i am uploading the files to FTP server. but i want to know how to detect the connection loss (if any) while transfering the files. should i have to ping the server at certain time intervals or is there any other way of detecting the connection breakdown.???vijay.
-
Hi, No, pinging does tell you nothing because e.g. server can disconnect your session in any reason but its own will still working. Add callback function to your code and check events CInternetSession::OnStatusCallback.
----------- Mila
ok sir, thanks a lot.:)
vijay.