Categorygithub.com/felixge/tcpkeepalive
modulepackage
0.0.0-20220224101934-f56176a53a1b
Repository: https://github.com/felixge/tcpkeepalive.git
Documentation: pkg.go.dev

# README

tcpkeepalive

Known Issues: Some problems with the implementation were reported, I'll try to fix them when I get a chance, or if somebody sends a PR.

Package tcpkeepalive implements additional TCP keepalive control beyond what is currently offered by the net pkg.

Only Linux >= 2.4, DragonFly, FreeBSD, NetBSD and OS X >= 10.8 are supported at this point, but patches for additional platforms are welcome.

See also: https://felixge.de/2014/08/26/using-tcp-keepalive-with-go/

License: MIT

Docs: http://godoc.org/github.com/felixge/tcpkeepalive

# Functions

EnableKeepAlive enables TCP keepalive for the given conn, which must be a *tcp.TCPConn.
Enable TCP keepalive in non-blocking mode with given settings for the connection, which must be a *tcp.TCPConn.

# Structs

Conn adds additional TCP keepalive control to a *net.TCPConn.