Back to product page

BufferSize function


Determines the size of incoming and outgoing buffers.

Type

A Long value. If successful, 0 is returned, otherwise error as specified here

Syntax

  • C
long Sftp_GetBufferSize(void *Sftp, long *pVal);
long Sftp_SetBufferSize(void *Sftp, long *newVal);
The BufferSize(void *Sftp,long *pVal, newVal) syntax has these parts:
void *SftpHandle of the created Sftp instance.
long *pVal, newValA Long value. Specifies buffer size.

Remarks

Using the BufferSize property you can force wodSFTP to use a predefined buffer size for receiving and sending packets between wodSFTP and the server. Usually larger packets will give you faster transfers, but this can also depend on your connection speed and on the server's capabilities.

In addition to the speed of transfer, this value also determines how many times the Progress callback will be called during any transfer. If you are on a slow connection and need the Progress callback to be invoked more frequently, a lower BufferSize value will facilitate this. Internally, the Progress callback is called after each packet sent/received - so smaller packets cause a higher Progress call rate.

If you set BufferSize to 0 (default value), internally wodSFTP will adjust its buffers to match the server's. Usually, this will be result in 32k buffers.

Platforms

Windows