1
0
mirror of https://github.com/google/gops.git synced 2025-02-16 19:57:19 +02:00
gops/agent/sockopt_unsupported.go
Tobias Klauser 268f11e4fc agent: allow to set SO_REUSEPORT on listening socket
Introduce Option.SocketReuseAddrAndPort which, if set, will lead to the
SO_REUSEPORT socket option being set on the listening socket on
Unix-like OSes. This also sets SO_REUSEADDR which is already the default
in net.Listen (see net.setDefaultSockopts).

Setting these options increases the chance to re-bind() to the same
address and port upon agent restart if Options.Addr is set.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2020-12-09 19:27:52 +01:00

14 lines
324 B
Go

// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build js,wasm plan9 windows
package agent
import "syscall"
func setsockoptReuseAddrAndPort(network, address string, c syscall.RawConn) error {
return nil
}