]> Cypherpunks repositories - gostls13.git/commit
net: deduplicate sendfile files
authorqmuntal <quimmuntal@gmail.com>
Wed, 9 Apr 2025 10:07:03 +0000 (12:07 +0200)
committerGopher Robot <gobot@golang.org>
Thu, 10 Apr 2025 16:12:09 +0000 (09:12 -0700)
commit2c35900fe4256d6de132cbee6f5a15b29013aac9
tree9c5e4372acc7116fde0be2f050b6e1683d48ae36
parent9aad012a6e02d45b37757faeec20cc6923610baf
net: deduplicate sendfile files

The sendfile implementation for platforms supporting it is now in
net/sendfile.go, rather than being duplicated in separate files for
each platform.

The only difference between the implementations was the poll.SendFile
parameters, which have been harmonized, and also linux strictly
asserting for os.File, which now have been relaxed to allow any
type implementing syscall.Conn.

Change-Id: Ia1a2d5ee7380710a36fc555dbf681f7e996ea2ec
Reviewed-on: https://go-review.googlesource.com/c/go/+/664075
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Quim Muntal <quimmuntal@gmail.com>
src/internal/poll/sendfile.go
src/internal/poll/sendfile_unix.go
src/internal/poll/sendfile_windows.go
src/net/sendfile.go [moved from src/net/sendfile_unix_alt.go with 89% similarity]
src/net/sendfile_linux.go [deleted file]
src/net/sendfile_test.go
src/net/sendfile_windows.go [deleted file]
src/os/readfrom_solaris_test.go
src/os/writeto_linux_test.go
src/os/zero_copy_linux.go
src/os/zero_copy_solaris.go