client

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxPktBuf = 65536
	Backlog   = 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(cfg *Config) (*Client, error)

func (*Client) Close

func (client *Client) Close() error

type Config

type Config struct {
	BindAddress    string
	RemoteDialFunc func(ctx context.Context) (net.PacketConn, net.Addr, error)
	Timeout        time.Duration
	IdleTimeout    time.Duration
	BaseContext    context.Context
	PSKCallback    func([]byte) ([]byte, error)
	PSKIdentity    string
	MTU            int
	CipherSuites   ciphers.CipherList
	EllipticCurves ciphers.CurveList
	StaleMode      util.StaleMode
	TimeLimitFunc  func() time.Duration
	AllowFunc      func(net.Addr) bool
	EnableCID      bool
}

Jump to

Keyboard shortcuts

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