sockopt

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Control

func Control(opts ...Option) func(network, address string, c syscall.RawConn) error

Control returns a control function for the net.Dialer and net.ListenConfig.

Types

type Option

type Option func(opts *Options)

Option is the function paramater.

func Bind

func Bind(intf *net.Interface) Option

Bind sets the bind interface option.

func ReuseAddr

func ReuseAddr() Option

ReuseAddr sets the reuse addr option.

type Options

type Options struct {
	// contains filtered or unexported fields
}

Options is the options struct.

Jump to

Keyboard shortcuts

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