public void SendCommand( string command )
After calling this method, use the ReadResponse method to receive response from the server.
The State must be Ready or Processing when calling this method.
Shows how to use SendCommand and ReadResponse to send a command to an FTP server and read the response returned from the server.
using System; using System.Collections.Generic; using System.Text; using ComponentPro.Net; ... // Create a new Ftp instance. Ftp client = new Ftp(); // Connect to the FTP server. client.Connect("server"); // Authenticate. client.Authenticate("username", "password"); // Send command client.SendCommand("FEAT"); // Print out the response FtpResponse res = client.ReadResponse(); Console.WriteLine(res.RawResponse); // Disconnect. client.Disconnect();