This commit is contained in:
2026-05-28 21:32:46 +02:00
parent e8cac569e3
commit e82e30dd02
29 changed files with 2485 additions and 97 deletions
@@ -0,0 +1,14 @@
//go:build windows
package udp
import "golang.org/x/sys/windows"
// setSocketReuse enables SO_REUSEADDR on the socket before bind so that
// multiple processes (HamLog + Log4OM + …) can listen on the same UDP
// multicast port. Without it, Windows fails the second bind with
// WSAEADDRINUSE ("Une seule utilisation de chaque adresse de socket…").
func setSocketReuse(fd uintptr) error {
return windows.SetsockoptInt(windows.Handle(fd),
windows.SOL_SOCKET, windows.SO_REUSEADDR, 1)
}