cURL / Mailing Lists / curl-library / Single Mail


Re: sftp and buffersize

From: Daniel Stenberg <>
Date: Tue, 18 Oct 2011 14:07:04 +0200 (CEST)

On Mon, 17 Oct 2011, Jonas Schnelli wrote:

> Is the CURL_MAX_WRITE_SIZE anyhow configurable? (you already said no, aren't
> you? :) )

No it isn't.

> Is it difficult to make the CURL_MAX_WRITE_SIZE anyhow configurable?

Nah. Right now SessionHandle->uploadbuffer is a fixed array with a static
size, but it should be fairly easy to modify that to an allocated buffer for
which the size would be configurable with a setopt() option.

> I would then try to change the CURL_MAX_WRITE_SIZE (of let's say the SFTP
> buffer size) dependent on the historical speed of the nework (or maybe also
> configurable by the enduser: like "select your internet connection type:").

Perhaps we should rather just change the size internally at our own choice
depending on internally known details? After all, libcurl knows that SFTP will
benefit from huge buffers while an application cannot possibly know this. The
question is then perhaps only what a "large buffer" should be and perhaps have
that option set by the application?

List admin:
Received on 2011-10-18