tcp

package
v0.0.0-...-4df9163 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractConn

func ExtractConn(conn net.Conn) (*net.TCPConn, error)

ExtractConn tries to extract the underlying net.TCPConn from a tls.Conn or net.Conn.

func SetTimeouts

func SetTimeouts(conn *net.TCPConn, userTimeout time.Duration) error

SetTimeouts sets TCP_USER_TIMEOUT and TCP keep alive timeouts on a connection. If userTimeout is zero, then defaults to 2 minutes.

func SetUserTimeout

func SetUserTimeout(conn *net.TCPConn, timeout time.Duration) error

SetUserTimeout sets the TCP user timeout on a connection's socket.

Types

This section is empty.

Jump to

Keyboard shortcuts

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