1
0
mirror of https://github.com/google/gops.git synced 2024-11-24 08:22:25 +02:00
Commit Graph

4 Commits

Author SHA1 Message Date
Tobias Klauser
db6b6e9ba0 agent: rename setsockoptReuseAddrAndPort to setReuseAddrAndPortSockopts 2021-10-11 18:06:37 +02:00
Tobias Klauser
f38bd6a1ee agent: fix solaris build
Solaris doesn't provide the SO_REUSEPORT socket option.
2021-10-11 18:06:37 +02:00
Tobias Klauser
a22894be16 Add //go:build tags for Go 1.17
Run Go 1.17 gofmt to add //go:build tags.
2021-09-03 09:57:33 +02:00
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