tcpinfo

package
v1.62.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: BSD-3-Clause Imports: 4 Imported by: 2

Documentation

Overview

Package tcpinfo provides platform-agnostic accessors to information about a TCP connection (e.g. RTT, MSS, etc.).

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotTCP        = errors.New("tcpinfo: not a TCP conn")
	ErrUnimplemented = errors.New("tcpinfo: unimplemented")
)

Functions

func RTT

func RTT(conn net.Conn) (time.Duration, error)

RTT returns the RTT for the given net.Conn.

If the net.Conn is not a *net.TCPConn and cannot be unwrapped into one, then ErrNotTCP will be returned. If retrieving the RTT is not supported on the current platform, ErrUnimplemented will be returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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