aboutsummaryrefslogtreecommitdiff
path: root/src/strings
diff options
context:
space:
mode:
authorqmuntal <quimmuntal@gmail.com>2025-04-25 14:11:31 +0200
committerQuim Muntal <quimmuntal@gmail.com>2025-05-05 04:05:18 -0700
commit6953ef86cd72a835d398319c4da560c8b78ba28e (patch)
tree72fd37884f51e04be300863ddf86553f76d59265 /src/strings
parent8ec555931dc65f1cd0e7cf28d771615d8064a8ad (diff)
downloadgo-6953ef86cd72a835d398319c4da560c8b78ba28e.tar.xz
net,os: support converting between *os.File and net.Conn on Windows
The runtime poller and os.NewFile recently gained support for disassociating the handle from the runtime poller IOCP (see CL 664455). This was the main blocker for allowing the conversion between *os.File and net.Conn. Implementing the conversion is now trivial. The only remaining work, implemented in this CL, is improving os.NewFile to also support socket handles and updating some build tags so that Windows can share almost the same net's File implementation as Unix. There is one important limitation, though: the duplicated socket handle returned by the various File methods in the net package is not usable on other process. If someone needs to pass a socket handle to another process, they should manually call the WSADuplicateSocket Windows API passing the process ID of the target process. Fixes #9503. Fixes #10350. Updates #19098. Cq-Include-Trybots: luci.golang.try:gotip-windows-amd64-race,gotip-windows-amd64-longtest,gotip-windows-arm64 Change-Id: Ic43cadaac2662b925d57a9d362ddc7ae21d1b56e Reviewed-on: https://go-review.googlesource.com/c/go/+/668195 Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
Diffstat (limited to 'src/strings')
0 files changed, 0 insertions, 0 deletions