server

package
v5.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadCert

func LoadCert(tlsCfg *tls.Config, cert, key string) error

Types

type TCPServer

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

func NewTCPServer

func NewTCPServer(opts TCPServerOpts) *TCPServer

func (*TCPServer) ServeTCP

func (s *TCPServer) ServeTCP(l net.Listener) error

ServeTCP starts a server at l. It returns if l had an Accept() error. It always returns a non-nil error.

type TCPServerOpts

type TCPServerOpts struct {
	DNSHandler  dns_handler.Handler // Required.
	Logger      *zap.Logger
	IdleTimeout time.Duration
}

type UDPServer

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

func NewUDPServer

func NewUDPServer(opts UDPServerOpts) *UDPServer

func (*UDPServer) ServeUDP

func (s *UDPServer) ServeUDP(c net.PacketConn) error

ServeUDP starts a server at c. It returns if c had a read error. It always returns a non-nil error.

type UDPServerOpts

type UDPServerOpts struct {
	DNSHandler dns_handler.Handler // Required.
	Logger     *zap.Logger
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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