github.com/sagernet/sing@v0.2.6/common/unsafe_default.go (about) 1 //go:build !unsafe_buffer && !disable_unsafe_buffer 2 3 package common 4 5 import "runtime" 6 7 // net/*Conn in windows keeps the buffer pointer passed in during io operations, so we disable it by default. 8 // https://github.com/golang/go/blob/4068be56ce7721a3d75606ea986d11e9ca27077a/src/internal/poll/fd_windows.go#L876 9 10 const UnsafeBuffer = runtime.GOOS != "windows"