Back to product page

TransferRate function


Returns average speed of the file transfer.

Type

A Long value. Specifies average speed, in bytes/sec.

Syntax

  • C
long Sftp_GetTransferRate(void *Sftp, long *pVal);
The TransferRate(void *Sftp,long *pVal) syntax has these parts:
void *SftpHandle of the created Sftp instance.
long *pValA Long value.

Remarks

TransferRate defines how much maximum bandwidth wodSFTPdll currently use. You can call it to get current transfer rate (calculated as average value from the time transfer started), or to get average value of last file transfer (if it has already finished). Typicaly, you will use it from Progress callback, or from Done callback. Value is shown in "bytes per second" ratio.

To get correct kilobytes and megabytes per second values, you should divide desired bps rate with 1024 or 1024^2, not 1000.

If you want to see what was duration of the file transfer, you can check TransferTime property.

Platforms

Windows