tcpkeepalive

package
v1.0.23 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2024 License: Unlicense, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Period = 3 * time.Minute

Period can be changed prior to opening a Listener to alter its' KeepAlivePeriod.

Functions

This section is empty.

Types

type B

type B = []byte

type Ctx

type Ctx = context.T

type E

type E = error

type Listener

type Listener struct {
	time.Duration
	*net.TCPListener
}

Listener sets TCP keep-alive timeouts on accepted connections. It's used by ListenAndServe and ListenAndServeTLS so dead TCP connections (e.g. closing laptop mid-download) eventually go away.

func (Listener) Accept

func (ln Listener) Accept() (conn net.Conn, e error)

type N

type N = int

type S

type S = string

Jump to

Keyboard shortcuts

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