sockopt

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package sockopt provides cross-platform ways to interact with socket options.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HasHopLimit

type HasHopLimit interface {
	// HopLimit returns the hop limit field value for outgoing packets.
	HopLimit() (int, error)
	// SetHopLimit sets the hop limit field value for future outgoing packets.
	SetHopLimit(hoplim int) error
}

HasHopLimit enables manipulation of the hop limit option.

type TCPOptions

type TCPOptions interface {
	HasHopLimit
}

TCPOptions represents options for TCP connections.

func NewTCPOptions

func NewTCPOptions(conn *net.TCPConn) (TCPOptions, error)

NewTCPOptions creates a TCPOptions for the given net.TCPConn.

Jump to

Keyboard shortcuts

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