CFtpClient::GetIdleTimeout Method  
 
INT GetIdleTimeout();

The GetIdleTimeout method returns the idle timeout period for the control channel.

Parameters

None.

Return Value

If the method succeeds, the return value is the timeout period in seconds. If the method fails, the return value is FTP_ERROR. To get extended error information, call the GetLastError method.

Remarks

The GetIdleTimeout method returns the server-side idle timeout value that was most recently set for the control connection using the SetIdleTimeout method. This value represents how long the server will wait during periods of inactivity before automatically closing the connection. If the idle timeout has not been explicitly set during the session, the method will return the default timeout value of 300 seconds (5 minutes).

The timeout value is only available if the server supports the non-standard SITE IDLE command. If the server does not support this command, this method will fail. In that case, the default timeout enforced by the server will apply, but the timeout period cannot be accessed or changed by the client. This method will also return an error if the session is using SFTP, as that protocol does not separate control and data channels and does not support idle timeout settings in the same way.

This method does not query the server for the current idle timeout value for the control channel. It simply returns the last known value that was successfully applied during the current session, if available.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csftpv12.lib

See Also