Documentation
¶
Overview ¶
***** DO NOT EDIT. ***** Code generated by the github.com/aileron-projects/go-sockopts/cmd/generator/generate.go
Index ¶
Constants ¶
View Source
const ( SOL_SOCKET = unix.SOL_SOCKET IPPROTO_IP = unix.IPPROTO_IP IPPROTO_IPV6 = unix.IPPROTO_IPV6 IPPROTO_TCP = unix.IPPROTO_TCP IPPROTO_UDP = unix.IPPROTO_UDP )
Variables ¶
View Source
var ( SO_DEBUG = Bool{Level: unix.SOL_SOCKET, Opt: unix.SO_DEBUG, Name: "SO_DEBUG"} SO_KEEPALIVE = Bool{Level: unix.SOL_SOCKET, Opt: unix.SO_KEEPALIVE, Name: "SO_KEEPALIVE"} SO_LINGER = Linger{Level: unix.SOL_SOCKET, Opt: unix.SO_LINGER, Name: "SO_LINGER"} SO_RCVBUF = Int{Level: unix.SOL_SOCKET, Opt: unix.SO_RCVBUF, Name: "SO_RCVBUF"} SO_SNDBUF = Int{Level: unix.SOL_SOCKET, Opt: unix.SO_SNDBUF, Name: "SO_SNDBUF"} SO_SNDTIMEO = Timeval{Level: unix.SOL_SOCKET, Opt: unix.SO_SNDTIMEO, Name: "SO_SNDTIMEO"} SO_RCVTIMEO = Timeval{Level: unix.SOL_SOCKET, Opt: unix.SO_RCVTIMEO, Name: "SO_RCVTIMEO"} SO_REUSEADDR = Bool{Level: unix.SOL_SOCKET, Opt: unix.SO_REUSEADDR, Name: "SO_REUSEADDR"} SO_REUSEPORT = Bool{Level: unix.SOL_SOCKET, Opt: unix.SO_REUSEPORT, Name: "SO_REUSEPORT"} IP_TTL = Int{Level: unix.IPPROTO_IP, Opt: unix.IP_TTL, Name: "IP_TTL"} IPV6_V6ONLY = Bool{Level: unix.IPPROTO_IPV6, Opt: unix.IPV6_V6ONLY, Name: "IPV6_V6ONLY"} TCP_KEEPCNT = Int{Level: unix.IPPROTO_TCP, Opt: unix.TCP_KEEPCNT, Name: "TCP_KEEPCNT"} TCP_KEEPINTVL = Int{Level: unix.IPPROTO_TCP, Opt: unix.TCP_KEEPINTVL, Name: "TCP_KEEPINTVL"} TCP_MAXSEG = Int{Level: unix.IPPROTO_TCP, Opt: unix.TCP_MAXSEG, Name: "TCP_MAXSEG"} TCP_NODELAY = Bool{Level: unix.IPPROTO_TCP, Opt: unix.TCP_NODELAY, Name: "TCP_NODELAY"} TCP_FASTOPEN = Bool{Level: unix.IPPROTO_TCP, Opt: unix.TCP_FASTOPEN, Name: "TCP_FASTOPEN"} )
Functions ¶
This section is empty.
Types ¶
type ControlFunc ¶
ControlFunc controls connections. Socket options are configures through conn.
func Control ¶
func Control(fs ...SetFunc) ControlFunc
Control returns a ControlFunc from given functions. Control is the alias for SetFuncs(fs).Control.
type Error ¶
type Error struct {
Inner error // Inner is the inner error.
Level string // Level is the socket level. e.g. "SOL_SOCKET"
Opt string // Opt is the option name. e.g. "SO_BINDTOIFINDEX"
Msg string // Msg is the error message.
}
Error is the socket option error.
type Option ¶
type Option struct {
Level int // Level is the protocol level.
Opt int // Opt is the option.
Name string // Name is the option name. Used for logging.
}
Option is the socket option.
type SetFunc ¶
SetFunc is the function that set socket option to fd. SetFuncs provides Control method that can be used for net.ListenConfig.Control.
type SetFuncs ¶
type SetFuncs []SetFunc
SetFuncs is the collection of SetFunc. SetFuncs provides Control method that can be used for net.ListenConfig.Control.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
generator
command
|
|
|
custom
command
|
|
|
multiple_opts
command
|
|
|
reuseaddr
command
|
|
|
reuseport
command
|
|
|
single_opt
command
|
Click to show internal directories.
Click to hide internal directories.