fix(stream): use platform-specific socket options for Windows cross-compilation
This commit is contained in:
parent
55fb74c814
commit
264be4e309
3 changed files with 19 additions and 1 deletions
9
internal/engine/sockopt_windows.go
Normal file
9
internal/engine/sockopt_windows.go
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
//go:build windows
|
||||
|
||||
package engine
|
||||
|
||||
import "syscall"
|
||||
|
||||
func setReuseAddr(fd uintptr) error {
|
||||
return syscall.SetsockoptInt(syscall.Handle(fd), syscall.SOL_SOCKET, syscall.SO_REUSEADDR, 1)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue