public void ClearCommandChannel()
This method implements the FTP CCC (Clear Command Channel) command.
This command is used in circumstances where it is desirable to protect the control connection only during authentication, when user credentials are being sent by the client.
When the control connection is reverted to plaintext, subsequent data transfers will be protected with the current SecureDataTransfers settings.
Shows how to use ClearCommandChannel method.
using System; using System.Collections.Generic; using System.Text; using ComponentPro; using ComponentPro.Net; ... // Create a new class instance. Ftp client = new Ftp(); // Connect to the FTP server asynchronously. client.Connect("myserver"); // Or you can specify the FTP port with // client.Connect("myserver", 21); // Authenticate the user. client.Authenticate("userName", "password"); // ... // Use the ClearCommandChannel to revert back to unencrypted FTP control connection // after logging in (data connections can stay encrypted after this), enabling the // firewall to work again in exchange for a degree of security. // From now on, all data sending to the server will not be protected. client.ClearCommandChannel(); // ... // Disconnect. client.Disconnect();