Back to product page

Progress callback


Called during file sending or receiving.

Syntax

  • C
void (*StateChange)(void *Sftp, __int64 Position, __int64 Total);
The Progress(void *Sftp,__int64 Position,__int64 Total) syntax has these parts:
void *SftpHandle of the created Sftp instance.
__int64 PositionCurrent transfer position.
__int64 TotalTotal 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.

Platforms

Windows