Re: Feature-Request: sendfile(2)

2021-02-26 Thread Emil Engler via curl-library
Okay, first thanks for your interest and time to reply to my suggestion =) I think the arguments listed in this e-mail are probably enough to dismiss the idea. Have a nice weekend! Cheers, Emil On Fri, Feb 26, 2021 at 10:10:01AM +0100, Michael Felt via curl-library wrote: > a) Long before sendfi

Re: Feature-Request: sendfile(2)

2021-02-26 Thread Michael Felt via curl-library
a) Long before sendfile() there was/is send_file() in the UNIX world. b) just read in the linux man pages that sendfile() is limited to 2GB file transfers c) imho - too much complexity for read/write activity when one medium (network) is likely much slower (or faster) than another medium - or e

Re: Feature-Request: sendfile(2)

2021-02-25 Thread Gisle Vanem via curl-library
Emil Engler wrote: However implementing this syscall also raises some problems, including limited support. AFAIK only Linux and FreeBSD support this syscall (maybe even macOS as it inherited a lot from FreeBSD). FYI, Windows has a similar 'TransmitFile()' function: https://docs.microsoft.co

Re: Feature-Request: sendfile(2)

2021-02-25 Thread Eric Wong via curl-library
Emil Engler via curl-library wrote: > Hello curl-library, > I recently thought about implementing the syscall sendfile(2) into > libcurl to speed up downloads to a file. For those of you who don't > know what it is: "downloads to a file"? Meaning socket => regular file? I hope I understand you c

Re: Feature-Request: sendfile(2)

2021-02-25 Thread Daniel Stenberg via curl-library
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

Re: Feature-Request: sendfile(2)

2021-02-25 Thread Christian Schmitz via curl-library
> Am 25.02.2021 um 12:10 schrieb Emil Engler via curl-library > : > (maybe even macOS as it inherited a lot from FreeBSD). From the man page: The sendfile() system call first appeared in Darwin 9.0 (Mac OS X version 10.5) . Sincerely Christian -

Feature-Request: sendfile(2)

2021-02-25 Thread Emil Engler via curl-library
Hello curl-library, I recently thought about implementing the syscall sendfile(2) into libcurl to speed up downloads to a file. For those of you who don't know what it is: sendfile() copies data between one file descriptor and another. Because this copying is done within the kernel, sendfile() is