udptransport

package
v0.0.0-...-1dbb05a Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BindIPAddressV4 net.IP // Address to bind to
	BindIPAddressV6 net.IP
}

Config contains the configuration for UDPTransport

type UDPTransport

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

UDPTransport implements the transport interface with UDP

func New

func New(config *Config) (*UDPTransport, error)

New instantiates a new UDPTransport

func (*UDPTransport) Close

func (u *UDPTransport) Close()

Close shuts down all sockets

func (*UDPTransport) Receive

func (u *UDPTransport) Receive() <-chan *dns.Msg

Receive returns a channel that outputs received dns messages

func (*UDPTransport) Send

func (u *UDPTransport) Send(msg *dns.Msg) error

Send sends a dns message over all UDP connections

Jump to

Keyboard shortcuts

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