sockopts

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package sockopts provides socket option helpers for TCP tuning across platforms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConn

func ApplyConn(conn net.Conn, opts Options) error

ApplyConn applies socket options to a net.Conn. Used by StdEngine.

func ApplyFD

func ApplyFD(fd int, opts Options) error

ApplyFD applies socket options to a raw file descriptor. Platform-specific options (TCP_QUICKACK, SO_BUSY_POLL) are handled by build-tagged files.

Types

type Options

type Options struct {
	TCPNoDelay  bool
	TCPQuickAck bool
	SOBusyPoll  time.Duration
	RecvBuf     int
	SendBuf     int
}

Options configures socket-level tuning parameters applied to accepted connections.

Jump to

Keyboard shortcuts

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