sonicopts

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option interface {
	Type() OptionType
	Value() interface{}
}

func AddOption

func AddOption(add Option, opts []Option) []Option

func BindSocket

func BindSocket(addr net.Addr) Option

BindSocket covers the case in which the user wants to bind the socket to a specific address when Dialing a remote endpoint.

func DelOption

func DelOption(del OptionType, opts []Option) []Option

func NoDelay

func NoDelay(v bool) Option

func Nonblocking

func Nonblocking(v bool) Option

func ReuseAddr

func ReuseAddr(v bool) Option

func ReusePort

func ReusePort(v bool) Option

type OptionType

type OptionType uint8
const (
	TypeNonblocking OptionType = iota
	TypeReusePort
	TypeReuseAddr
	TypeNoDelay
	TypeBindSocket
	TypeMulticast
	MaxOption
)

func (OptionType) String

func (t OptionType) String() string

Jump to

Keyboard shortcuts

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