cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl with sendfile

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 10 Mar 2008 11:02:02 -0700

On Mon, Mar 10, 2008 at 10:38:23AM -0700, Brian McQueen wrote:
> Does libcurl use linux's high performance sendfile routine when
> appropriate? I don't see it as fitting into the write callback
> scheme. The write callback scheme seems to use memory buffers in user
> space for handling the writes, but sendfile skips user space and sends
> directly from one fd to another fd.

No, it doesn't use sendfile. libcurl supports too many options that conflict
with sendfile (e.g. various timeouts, read callbacks, progress callbacks,
encrypted data, compressed data, chunked transfers, etc.) that the percentage
of combinations of options where it could be used is vanishingly small.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2008-03-10