TransferHandler Class


class TransferHandler : public HandlerBase (.. public RefCountable, public NoCopy)
  bool Success() const;
  FlowSshC_TransferStat GetTransferStat() const;
  TransferErr GetError() const;

  virtual void OnStart();
  virtual void OnDone();
  virtual void OnTransfer(bool done, FlowSshC_TransferStat const& transferStat);
  virtual void OnError(TransferErr const& error);


public class TransferHandler : IDisposable, HandlerBase (.. WaitImpl)
  public bool Success { get; }
  TransferStat GetTransferStat();
  public TransferErr GetError();
  public event StartEventHandler OnStart;
  public event DoneEventHandler OnDone;
  public event TransferEventHandler OnTransfer;
  public event TransferErrorEventHandler OnError;
  public override sealed bool IsDisposed { get; }
  public override sealed void Dispose();



  • Success: Request completed successfully?
  • GetTransferStat: Returns a TransferStat with information about the requested download/upload.
  • GetError: Returns a TransferErr.

Overrides and Events

  • OnStart: The first override/event being invoked for a request. *
  • OnDone: The last override/event being invoked for a request. *
  • OnTransfer: Invoked to pass information about the download/upload state to you.
    • transferStat: See GetTransferStat().
  • OnError: Invoked for a failed request.
    • error: See GetError().

[.NET] Disposing

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


This handler is used with with the [ClientSftpChannel]Download and [ClientSftpChannel]Upload requests.

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