tcp

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTCPPort = 80

DefaultTCPPort is the fallback port for generic TCP probes.

View Source
const ProtocolName = "tcp"

ProtocolName is the registered name for the TCP transport.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCP

type TCP struct{}

TCP implements greet.TransportLayer for plain TCP connections. It resolves DNS, dials, and returns the open conn together with TTDR and RTT. It sends no application data.

func New added in v1.0.3

func New() *TCP

New creates a new TCP transport layer.

func (*TCP) DefaultPort

func (t *TCP) DefaultPort() int

func (*TCP) Dial added in v1.0.3

func (t *TCP) Dial(ctx context.Context, start time.Time, host string, port int) (net.Conn, time.Duration, time.Duration, error)

Dial resolves host, establishes a TCP connection, and returns it open. start is the shared timing anchor owned by the engine; TTDR and RTT are measured relative to it. The caller is responsible for closing conn.

func (*TCP) Name

func (t *TCP) Name() string

func (*TCP) Transport

func (t *TCP) Transport() greet.Transport

Jump to

Keyboard shortcuts

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