netutils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAcceptTimeout = errors.New("i/o timeout")
View Source
var ErrClosedConn = errors.New("use of closed network connection")
View Source
var ErrServerClosed = fmt.Errorf("server closed")

Functions

func ConnWithAddr added in v0.0.2

func ConnWithAddr(conn net.Conn, localAddr, remoteAddr net.Addr) net.Conn

func ConnWithCloser added in v0.0.2

func ConnWithCloser(conn net.Conn, closer func() error) net.Conn

func IsAcceptTimeoutError

func IsAcceptTimeoutError(err error) bool

IsAcceptTimeoutError reports whether err is an error from use of a accept timeout.

func IsClosedConnError

func IsClosedConnError(err error) bool

IsClosedConnError reports whether err is an error from use of a closed network connection.

func IsServerClosedError

func IsServerClosedError(err error) bool

IsServerClosedError reports whether err is an error from server closed.

func NewNetAddr

func NewNetAddr(network, address string) net.Addr

Types

This section is empty.

Jump to

Keyboard shortcuts

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