On Mon, Mar 27, 2017 at 3:18 AM, <luajit...@gmail.com> wrote: > > For example, I have a big file, let's say 100 GB, and I need to post it to > some http server. > > Could I use sendfile() upon the http client? Then I would not need to copy > the file content into user space before sending it. > > It seems that the http lib do not export the underlying tcp connection.
There is no way to do that. I think it might be possible, though rather painful, to thread a *os.File passed to Client.post through so that sendfile will be used automatically if available. It would require explicitly not adding buffering for the case of a file. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.