tcp

package
v0.0.0-...-288c4de Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: 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