Disconnects the FTP client from the FTP server to which it is connected.
public string Disconnect()
Public Function Disconnect As String
public:
String Disconnect();
Return Value
The exit message returned by the server.
Remarks
The Disconnect method sends the QUIT command to the FTP server and makes sure that the command connection is closed.
Shows how to use Connect, Authenticate, and Disconnect methods to establish a connection and disconnect.
using ComponentPro.Net;
...
// Create a new class instance.
Ftp client = new Ftp();
// Connect to the FTP server.
client.Connect("myserver");
// Or you can specify the FTP port with
// client.Connect("myserver", 21);
// Authenticate.
client.Authenticate("userName", "password");
// Do something here...
client.DownloadFile("/my remote file.dat", "my local file");
// Disconnect.
client.Disconnect();
Imports ComponentPro.Net
...
' Create a new class instance.
Dim client As New Ftp()
' Connect to the FTP server.
client.Connect("myserver")
' Or you can specify the FTP port with
' client.Connect("myserver", 21);
' Authenticate.
client.Authenticate("userName", "password")
' Do something here...
client.DownloadFile("/my remote file.dat", "my local file")
' Disconnect.
client.Disconnect()