GdPicture.NET Reference Guide
SetHttpTransferBufferSize Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : SetHttpTransferBufferSize Method
Changes the packet size used for transferring data when creating the image from HTTP and FTP or when uploading the file to the FTP server. The initial value is 4096.
Syntax
'Declaration
 
Public Sub SetHttpTransferBufferSize( _
   ByVal Buffersize As Integer _
) 
public void SetHttpTransferBufferSize( 
   int Buffersize
)
public procedure SetHttpTransferBufferSize( 
    Buffersize: Integer
); 
public function SetHttpTransferBufferSize( 
   Buffersize : int
);
public: void SetHttpTransferBufferSize( 
   int Buffersize
) 
public:
void SetHttpTransferBufferSize( 
   int Buffersize
) 

Parameters

Buffersize
Example
How to change the packet size for data transfer.
Dim caption As String = "Example: SetHttpTransferBufferSize"
Using oImage As GdPictureImaging = New GdPictureImaging()
    oImage.SetFtpPassiveMode(True)
    oImage.SetHttpTransferBufferSize(8192)
    If oImage.UploadFileToFTP("myimage.jpg", "ftp.com", "d:/images/image.jpg", "GdPictureUser", "Password123", 21) = GdPictureStatus.OK Then
        MessageBox.Show("The image has been uploaded successfully.", caption)
    Else
        MessageBox.Show("The image can't be uploaded. Status: " + oImage.GetStat().ToString(), caption)
    End If
End Using
string caption = "Example: SetHttpTransferBufferSize";
using (GdPictureImaging oImage = new GdPictureImaging())
{
    oImage.SetFtpPassiveMode(true);
    oImage.SetHttpTransferBufferSize(8192);
    if (oImage.UploadFileToFTP("myimage.jpg", "ftp.com", "d:/images/image.jpg", "GdPictureUser", "Password123", 21) == GdPictureStatus.OK)
        MessageBox.Show("The image has been uploaded successfully.", caption);
    else
        MessageBox.Show("The image can't be uploaded. Status: " + oImage.GetStat().ToString(), caption);
}
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members
SetFtpPassiveMode Method
UploadFileToFTP Method
CreateGdPictureImageFromHTTP(String,String,Int32) Method
CreateGdPictureImageFromFTP Method