Documentation
¶
Overview ¶
Package control provides network socket option
Package control provides network socket option
Index ¶
Constants ¶
View Source
const ( SOL_SOCKET = syscall.SOL_SOCKET IPPROTO_TCP = syscall.IPPROTO_TCP SOL_IP = 0 SOL_IPV6 = 0 SO_REUSEADDR = unix.SO_REUSEADDR SO_REUSEPORT = unix.SO_REUSEPORT SO_KEEPALIVE = unix.SO_KEEPALIVE TCP_NODELAY = unix.TCP_NODELAY TCP_CORK = 0 TCP_QUICKACK = 0 TCP_DEFER_ACCEPT = 0 TCP_KEEPINTVL = unix.TCP_KEEPINTVL TCP_KEEPIDLE = 0 TCP_FASTOPEN = unix.TCP_FASTOPEN TCP_FASTOPEN_CONNECT = 0 IP_TRANSPARENT = 0 IPV6_TRANSPARENT = 0 IP_RECVORIGDSTADDR = 0 IPV6_RECVORIGDSTADDR = 0 )
Variables ¶
View Source
var SetsockoptInt = unix.SetsockoptInt
Functions ¶
This section is empty.
Types ¶
type SocketController ¶
type SocketController interface {
GetControl() func(network, addr string, c syscall.RawConn) (err error)
}
func New ¶
func New(flag SocketFlag, keepAlive int) SocketController
type SocketFlag ¶
type SocketFlag uint
const ( ReusePort SocketFlag = 1 << iota ReuseAddr TCPFastOpen TCPNoDelay TCPCork TCPQuickAck TCPDeferAccept IPTransparent IPRecoverDestinationAddr )
Click to show internal directories.
Click to hide internal directories.