Sends a NOOP command to the server to keep the connection alive. Some servers ignore the NOOP command.
public void KeepAlive()
Public Sub KeepAlive
public:
void KeepAlive();
Shows how to use the KeepAlive method to keep the connection alive.
using System;
using ComponentPro.Net;
...
// Create a new class instance.
Ftp client = new Ftp();
// Connect to the FTP server.
client.Connect("myserver");
// Authenticate.
client.Authenticate("userName", "password");
// ...
// Keep the connection alive.
client.KeepAlive();
// ...
// Disconnect.
client.Disconnect();
Imports ComponentPro.Net
...
' Create a new class instance.
Dim client As New Ftp()
' Connect to the FTP server.
client.Connect("myserver")
' Authenticate.
client.Authenticate("userName", "password")
' ...
' Keep the connection alive.
client.KeepAlive()
' ...
' Disconnect.
client.Disconnect()