mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

``` gofmt' started at Thu Mar 18 18:06:00 UTC 2021 transport/sockopt_unix.go diff -u transport/sockopt_unix.go.orig transport/sockopt_unix.go --- transport/sockopt_unix.go.orig 2021-03-18 18:06:01.667483834 +0000 +++ transport/sockopt_unix.go 2021-03-18 18:06:01.667483834 +0000 @@ -1,3 +1,4 @@ +//go:build !windows // +build !windows package transport transport/sockopt_windows.go diff -u transport/sockopt_windows.go.orig transport/sockopt_windows.go --- transport/sockopt_windows.go.orig 2021-03-18 18:06:01.667483834 +0000 +++ transport/sockopt_windows.go 2021-03-18 18:06:01.667483834 +0000 @@ -1,3 +1,4 @@ +//go:build windows // +build windows ```
20 lines
484 B
Go
20 lines
484 B
Go
//go:build windows
|
|
// +build windows
|
|
|
|
package transport
|
|
|
|
import (
|
|
"fmt"
|
|
"syscall"
|
|
)
|
|
|
|
func setReusePort(network, address string, c syscall.RawConn) error {
|
|
return fmt.Errorf("port reuse is not supported on Windows")
|
|
}
|
|
|
|
// Windows supports SO_REUSEADDR, but it may cause undefined behavior, as
|
|
// there is no protection against port hijacking.
|
|
func setReuseAddress(network, addr string, conn syscall.RawConn) error {
|
|
return fmt.Errorf("address reuse is not supported on Windows")
|
|
}
|