server6

package
v0.0.0-...-3d886c0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2019 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler func(conn net.PacketConn, peer net.Addr, m dhcpv6.DHCPv6)

Handler is a type that defines the handler function to be called every time a valid DHCPv6 message is received

type Server

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

Server represents a DHCPv6 server object

func NewServer

func NewServer(addr net.UDPAddr, handler Handler) *Server

NewServer initializes and returns a new Server object

func (*Server) ActivateAndServe

func (s *Server) ActivateAndServe() error

ActivateAndServe starts the DHCPv6 server. The listener will run in background, and can be interrupted with `Server.Close`.

func (*Server) Close

func (s *Server) Close() error

Close sends a termination request to the server, and closes the UDP listener

func (*Server) LocalAddr

func (s *Server) LocalAddr() net.Addr

LocalAddr returns the local address of the listening socket, or nil if not listening

Jump to

Keyboard shortcuts

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