Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Feature-Request: sendfile(2)
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Stenberg via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 25 Feb 2021 22:56:07 +0100 (CET)
On Thu, 25 Feb 2021, Emil Engler via curl-library wrote:
> I recently thought about implementing the syscall sendfile(2) into
> libcurl to speed up downloads to a file.
An interesting idea, but one full of caveats.
sendfile would only work (effectively) for clear-text downloads using TCP (ie
not TLS nor UDP and HTTP/2 isn't really done for it either and not compressed
or chunked HTTP/1 either) but I still think the "downloads to a file
(descriptor)" is the biggest limiting factor.
The only time libcurl knows that it downloads to a file is when the write
callback is left at default and only CURLOPT_WRITEDATA is set, which not even
the curl tool does...
I'm not dismissing the idea, but it certainly isn't entirely straight-forward.
Date: Thu, 25 Feb 2021 22:56:07 +0100 (CET)
On Thu, 25 Feb 2021, Emil Engler via curl-library wrote:
> I recently thought about implementing the syscall sendfile(2) into
> libcurl to speed up downloads to a file.
An interesting idea, but one full of caveats.
sendfile would only work (effectively) for clear-text downloads using TCP (ie
not TLS nor UDP and HTTP/2 isn't really done for it either and not compressed
or chunked HTTP/1 either) but I still think the "downloads to a file
(descriptor)" is the biggest limiting factor.
The only time libcurl knows that it downloads to a file is when the write
callback is left at default and only CURLOPT_WRITEDATA is set, which not even
the curl tool does...
I'm not dismissing the idea, but it certainly isn't entirely straight-forward.
-- / daniel.haxx.se | Commercial curl support up to 24x7 is available! | Private help, bug fixes, support, ports, new features | https://www.wolfssl.com/contact/ ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2021-02-25