wodSFTP API library - Progress Callback
    
 

Description

Called during file sending or receiving.


Syntax

void (*StateChange)(void *Sftp, __int64 Position, __int64 Total);

The Progress callback syntax has these parts:

Part Description
void *Sftp Handle of the created Sftp instance.
__int64 Position Current transfer position.
__int64 Total Total number of bytes that should be transferred.

Remarks

This callback can be used for monitoring file transfers. It is called during file transfers started by the GetFile or PutFile methods. It will be called several times, depending on numerous factors, including network speed, buffer size and file size. There is no default rule governing the exact number of times it will be fired.

Once a transfer has finished, the Position argument will have the same value as the Total argument.  Also, once a file transfer has finished the Done callback will be called.

NOTE: this callback is called only if you have created instance of SftpEventsStruct structure, and set up its Progress member to function implementing it.