| 1 |
// Copyright 2025 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
package net |
| 6 |
|
| 7 |
import "internal/syscall/windows" |
| 8 |
|
| 9 |
// Workstation and client versions of Windows limit the number |
| 10 |
// of concurrent TransmitFile operations allowed on the system |
| 11 |
// to a maximum of two. Please see: |
| 12 |
// https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-transmitfile |
| 13 |
// https://golang.org/issue/73746 |
| 14 |
func supportsSendfile() bool { |
| 15 |
if testHookSupportsSendfile != nil { |
| 16 |
return testHookSupportsSendfile() |
| 17 |
} |
| 18 |
return windows.SupportUnlimitedTransmitFile() |
| 19 |
} |