overlay

package
v0.0.0-...-c8fc2fc Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPv4Name     = "IPv4"
	IPv6Name     = "IPv6"
	IPv46Name    = "IPv4+6"
	UDPIPv4Name  = "UDP/IPv4"
	UDPIPv6Name  = "UDP/IPv6"
	UDPIPv46Name = "UDP/IPv4+6"
)
View Source
const (
	// EndhostPort is the overlay port that the dispatcher binds to on non-routers. Subject to
	// change during standardisation.
	EndhostPort = 30041
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Type

type Type int
const (
	Invalid Type = iota
	IPv4
	IPv6
	IPv46
	UDPIPv4
	UDPIPv6
	UDPIPv46
)

func OverlayFromIP

func OverlayFromIP(ip net.IP, ot Type) Type

func TypeFromString

func TypeFromString(s string) (Type, error)

func (Type) IsIPv4

func (ot Type) IsIPv4() bool

func (Type) IsIPv6

func (ot Type) IsIPv6() bool

func (Type) IsUDP

func (ot Type) IsUDP() bool

func (Type) MarshalJSON

func (ot Type) MarshalJSON() ([]byte, error)

func (Type) String

func (o Type) String() string

func (Type) To4

func (ot Type) To4() Type

func (Type) To6

func (ot Type) To6() Type

func (Type) ToIP

func (ot Type) ToIP() Type

type UDP

type UDP struct {
	Conn *net.UDPConn
	// contains filtered or unexported fields
}

func NewUDP

func NewUDP(ip net.IP, port int) *UDP

func (*UDP) BindAddr

func (u *UDP) BindAddr() *net.UDPAddr

func (*UDP) Connect

func (u *UDP) Connect(raddr *net.UDPAddr) error

func (*UDP) Equal

func (u *UDP) Equal(other *UDP) bool

func (*UDP) Listen

func (u *UDP) Listen() error

func (*UDP) PublicAddr

func (u *UDP) PublicAddr() *net.UDPAddr

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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