net.tune
net.tune copied to clipboard
tunable TCP listeners for go 1.3
net.tune

Tunable TCP listeners for go 1.3+. Provides extra options for TCP sockets.
Overview
The tune.TuneAndListen
function works the same as net.Listen
with
self-referential functions for options.
// sets SO_REUSEPORT on the socket
listener, err := tune.TuneAndListen("tcp", "0.0.0.0:80", tune.ReusePort)
Supported Socket Options
-
SO_REUSEPORT
:ReusePort
-
TCP_FASTOPEN
:FastOpen
Supported Platforms
- darwin
- linux
Thanks
Based on steview's post to go-nuts.