status-go/vendor/github.com/libp2p/go-reuseport/control_windows.go

14 lines
280 B
Go
Raw Normal View History

2019-06-09 07:24:20 +00:00
package reuseport
import (
"syscall"
"golang.org/x/sys/windows"
)
func Control(network, address string, c syscall.RawConn) (err error) {
return c.Control(func(fd uintptr) {
err = windows.SetsockoptInt(windows.Handle(fd), windows.SOL_SOCKET, windows.SO_REUSEADDR, 1)
})
}