FtpGetIdleTimeout Function  
 
INT WINAPI FtpGetIdleTimeout(
  HCLIENT hClient  
);

The FtpGetIdleTimeout function returns the idle timeout period for the control channel.

Parameters

hClient
Handle to the client session.

Return Value

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

Remarks

The FtpGetIdleTimeout function returns the server-side idle timeout value that was most recently set for the control connection using the FtpSetIdleTimeout function. 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 function 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 function 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 function 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 function 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