TransferStat Structure/Class

[C/C++]

struct FlowSshC_TransferStat
{
  unsigned __int64 m_bytesTransferred;
  unsigned __int64 m_timeElapsedMs;
  unsigned __int64 m_currentFileSize;
  unsigned __int64 m_finalFileSize; // May change during transfer due to text conversion.
  bool m_finalFileSizeValid;
};

[C#]

public sealed class TransferStat
{
  public ulong BytesTransferred;
  public ulong TimeElapsedMs;
  public ulong CurrentFileSize;
  public ulong FinalFileSize; // May change during transfer due to text conversion.
  public bool FinalFileSizeValid;
}

Members

  • BytesTransferred: Bytes transferred in current download/upload session. May be a zero value.
  • TimeElapsedMs: Elapsed time of current download/upload session. May be a zero value. The current transfer speed may be calculated as: (1000 * BytesTransferred / TimeElapsedMs) [Bytes / sec].
  • CurrentFileSize: Current file size. For resumed transfers CurrentFileSize != BytesTransferred. May be a zero value.
  • FinalFileSize: May change during transfer due to text conversion. May be a zero value. The percentage of the file transfered so far is roughly: (100 * CurrentFileSize / FinalFileSize) [%].
  • FinalFileSizeValid: Final file size will be invalid, if the source file size cannot be retrieved. Furthermore, final size will go invalid, if a transfer reaches the final size without also reaching EOF. When the final size is invalid, it will hold the same value as current file size. A successfully completed file transfer will always hold a valid final size that will be equal to current file size; however, that is not necessarily true the other way around.

Remarks

Contains information about a started [ClientSftpChannel]Download or [ClientSftpChannel]Upload request. The status is reported through a transfer handler.