//go:build windows package cat import "golang.org/x/sys/windows" // setSocketReuse enables SO_REUSEADDR before bind, so discovery can listen on // :4992 while SmartSDR is already listening for the same radio broadcast. // Without it the second bind fails with WSAEADDRINUSE and the operator has to // type the radio's IP by hand. func setSocketReuse(fd uintptr) error { return windows.SetsockoptInt(windows.Handle(fd), windows.SOL_SOCKET, windows.SO_REUSEADDR, 1) }