windows: use SO_REUSEADDR form sys/windows instead of from syscall

Some constants in syscall are wrong, IIRC, and I'd like to avoid it as much as
possible.
This commit is contained in:
Steven Allen
2019-01-08 09:45:52 -08:00
parent f3425833f4
commit 4d84cd3e41

View File

@@ -8,6 +8,6 @@ import (
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, syscall.SO_REUSEADDR, 1)
err = windows.SetsockoptInt(windows.Handle(fd), windows.SOL_SOCKET, windows.SO_REUSEADDR, 1)
})
}