keepalive

package
v0.0.0-...-b359386 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package keepalive provides a listener that enables TCP keepalives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Listener

func Listener(l net.Listener) net.Listener

Listener returns a net.Listener that enables TCP keep-alive timeouts on accepted connections. It allows detection of dead TCP connections (e.g. closing laptop mid-download) to eventually go away. Derived from the Go net/http package.

func ReusableListen

func ReusableListen(proto, addr string) (net.Listener, error)

ReusableListen returns a TCP listener with SO_REUSEPORT and keepalives enabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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