mirror of
https://github.com/libp2p/go-reuseport.git
synced 2025-09-26 19:01:11 +08:00
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:
@@ -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)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user