control

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package control provides network socket option

Package control provides network socket option

Index

Constants

View Source
const (
	SOL_SOCKET           = 0
	IPPROTO_TCP          = 0
	SOL_IP               = 0
	SOL_IPV6             = 0
	SO_REUSEADDR         = 0
	SO_REUSEPORT         = 0
	SO_KEEPALIVE         = 0
	TCP_NODELAY          = 0
	TCP_CORK             = 0
	TCP_QUICKACK         = 0
	TCP_DEFER_ACCEPT     = 0
	TCP_KEEPINTVL        = 0
	TCP_KEEPIDLE         = 0
	TCP_FASTOPEN         = 0
	TCP_FASTOPEN_CONNECT = 0
	IP_TRANSPARENT       = 0
	IPV6_TRANSPARENT     = 0
	IP_RECVORIGDSTADDR   = 0
	IPV6_RECVORIGDSTADDR = 0
)

Variables

View Source
var SetsockoptInt = func(fd, level, opt int, value int) (err error) {
	return nil
}

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL