CFtpClient::GetStatus Method  
 
INT GetStatus();

The GetStatus method the current status of the client session.

Parameters

None.

Return Value

If the method succeeds, the return value is the client status code. If the method fails, the return value is FTP_ERROR. To get extended error information, call GetLastError.

Remarks

The GetStatus method returns a numeric code which identifies the current state of the client session. The following values may be returned:

Value Constant Description
0 FTP_STATUS_UNUSED No connection has been established.
1 FTP_STATUS_IDLE The client is current idle and not sending or receiving data.
2 FTP_STATUS_CONNECT The client is establishing a connection with the server.
3 FTP_STATUS_READ The client is reading data from the server.
4 FTP_STATUS_WRITE The client is writing data to the server.
5 FTP_STATUS_DISCONNECT The client is disconnecting from the server.
6 FTP_STATUS_OPENFILE The client is opening a data connection to the server.
7 FTP_STATUS_CLOSEFILE The client is closing the data connection to the server.
8 FTP_STATUS_GETFILE The client is downloading a file from the server.
9 FTP_STATUS_PUTFILE The client is uploading a file to the server.
10 FTP_STATUS_FILELIST The client is retrieving a file listing from the server.

In a multithreaded application, any thread in the current process may call this method to obtain status information for the specified client session. To obtain status information about a file transfer, use the GetTransferStatus method.

Requirements

Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: csftpv10.lib

See Also

IsBlocking, IsReadable, IsWritable, GetTransferStatus