summaryrefslogtreecommitdiffstats
path: root/contrib/go/_std_1.26/src/net/sendfile_windows.go
blob: 58ac8122dbe2d5ab190b242eaf06cac2c14c0592 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package net

import "internal/syscall/windows"

// Workstation and client versions of Windows limit the number
// of concurrent TransmitFile operations allowed on the system
// to a maximum of two. Please see:
// https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-transmitfile
// https://golang.org/issue/73746
func supportsSendfile() bool {
	if testHookSupportsSendfile != nil {
		return testHookSupportsSendfile()
	}
	return windows.SupportUnlimitedTransmitFile()
}