Back to product page

BufferSize property


Determines size of incoming and outgoing buffers.

Type

Integer.

Syntax

  • C#
  • VB.NET
Int32 BufferSize {get; set; };

Property BufferSize As Int32

Remarks

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

Besides speed of transfer, this value also determines how many times Progress event will be fired during transfer. If you're on slow connection and need Progress event to fire more times, lower BufferSize value. Internally, Progress event is fired after each packet sent/received - so making lower packets causes higher Progress event rate.

If you set BufferSize to 0 (default value), wodSFTP.NET will internally adjust its buffers to match server's. Usually, this will be 32k buffers for SFTP, and arround 128kb for other protocols.

Please note that size of receiving buffer in FTP(S) protocol(s) is fixed and cannot be changed - because wodSFTP.NET will receive all the data that arrived on the socket.

Platforms

Windows