Archived Forum Post

Index of archived forum posts

Question:

Get sftp transfer rate

Feb 10 '13 at 18:45

Hi,

How do I get information about the transfer speed when downloading or uploading using sftp?

Br,

Hendrik


Accepted Answer

You can use the DownloadRate and UploadRate events. Here's a partial VB6 example (doesn't actually download or upload, just shows the event parameters):

Option Explicit

Private WithEvents mo_Ftp As CHILKATSSHLib.ChilkatSFtp

Private Sub mo_Ftp_DownloadRate(ByVal byteCount As Long, ByVal bytesPerSec As Long)
   Debug.Print "Download BPS: " & bytesPerSec
End Sub

Private Sub mo_Ftp_UploadRate(ByVal byteCount As Long, ByVal bytesPerSec As Long)
   Debug.Print "Upload BPS: " & bytesPerSec
End Sub

Answer

For C or C++ those (downloadrate/uploadrate) are in the class CkSFtpProgress - see http://www.chilkatsoft.com/refdoc/vcCkSFtpDoc.html#prop008