:SetBufferSize()


Class

     aprFTP()

 

Syntax

     :SetBufferSize( nSize, [hSession] ) -> nBufferSize

 

Parameters

 

nSize

Numeric. The size of an internal buffer, in bytes.

Any value greater than or equal to zero is acceptable. If nSize is zero, then the default value of 4096 will be used. If nSize is between 1 and 255, inclusive, the buffer size will be set to 256. The maximum value is 1048576.

 

hSession

Optional: If hSession is not passed, the value in :Session will be used

 

Return

If the function succeeds, the return value is the size of the internal buffer that will be used.

 

To get further error information see :nErr and :cErr

 

Description

The :SetBufferSize() method sets the size in bytes of an internal buffer that will be used during data transfers.

  

The speed of data transfers, particularly on uploads, may be sensitive to network type and configuration, and the size of the internal buffer used for data transfers. The default size of this buffer will result in good performance for a wide range of network characteristics. A larger buffer will not necessarily result in better performance. For example, a value of 1460, which is the typical Maximum Transmission Unit (MTU), may be optimal in many situations.

 

See Also

:GetBufferSize(), :GetFile(), :PutFile()