Back to FlowSsh Documentation

TransferHandler Class

[C++]

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

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

[C#]

public class TransferHandler : IDisposable (.. : 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();
}

Members

General

  • 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.
    Parameters:
    • transferStat: See GetTransferStat().
  • 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 the [ClientSftpChannel]Download and [ClientSftpChannel]Upload requests.

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