server

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Backlog = 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

type Server

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

func New

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

func (*Server) Close

func (srv *Server) Close() error

Jump to

Keyboard shortcuts

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