socketopts

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package socketopts configures network socket options before use.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnsupportedMark indicates a nonzero firewall mark on an unsupported platform.
	ErrUnsupportedMark = errors.New("socket firewall mark is unsupported")
)

Functions

func NewDialer

func NewDialer(base *net.Dialer, mark uint32) (*net.Dialer, error)

NewDialer clones base and applies mark before every outbound and resolver socket connection.

func NewListenConfig added in v0.2.0

func NewListenConfig(base *net.ListenConfig, mark uint32) (*net.ListenConfig, error)

NewListenConfig clones base and applies mark before every socket bind.

Types

This section is empty.

Jump to

Keyboard shortcuts

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