Disconnect Event
Reports SFTP connection closure.
Syntax
public event OnDisconnectHandler OnDisconnect; public delegate void OnDisconnectHandler(object sender, SftpclientDisconnectEventArgs e); public class SftpclientDisconnectEventArgs : EventArgs { public int CloseReason { get; } }
Public Event OnDisconnect As OnDisconnectHandler Public Delegate Sub OnDisconnectHandler(sender As Object, e As SftpclientDisconnectEventArgs) Public Class SftpclientDisconnectEventArgs Inherits EventArgs Public ReadOnly Property CloseReason As Integer End Class
Remarks
The component fires this event to report connection closure. No more SFTP activity could be done after the disconnect.