Back to FlowSsh Documentation

SftpHandler Class

[C++]

class SftpHandler : public RefCountable, public NoCopy, public HandlerBase
{
public:
  bool Success() const;
  SftpErr GetError() const;

protected:
  virtual void OnStart();
  virtual void OnDone();
  virtual void OnSuccess();
  virtual void OnError(SftpErr const& error);
}

[C#]

public class SftpHandler : IDisposable (.. : WaitImpl)
{
  public bool Success { get; }
  public SftpErr GetError();
  
  public event StartEventHandler OnStart;
  public event DoneEventHandler OnDone;
  public event SuccessEventHandler OnSuccess;
  public event SftpErrorEventHandler OnError;
  
  public override sealed bool IsDisposed { get; }
  public override sealed void Dispose();
}

Members

General

  • Success: Request completed successfully?
  • GetError: Returns a SftpErr.

Overrides and Events

  • OnStart: The first override/event being invoked for a request. *
  • OnDone: The last override/event being invoked for a request. *
  • OnSuccess: Invoked when the request was successful.
  • OnError: Invoked for a failed request.
    Parameters:
    • error: See GetError().

[Net] Disposing

  • IsDisposed: Is the object disposed?
  • Dispose: Release all resources used by the object.

Remarks

This handler is used with with a variety of ClientSftpChannel requests.

* [Cpp] Always call the base class implementation from your override.