hostinfo

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addrs

type Addrs struct {
	IPv4 []byte `capnp:"ipv4"`
	IPv6 []byte `capnp:"ipv6"`
}

Addrs is an address union for use in capnp serializations.

type Host

type Host struct {
	Addrs Addrs  `capnp:"addrs"`
	Port  uint16 `capnp:"port"`
}

Host contains connectivity information for a host.

func FromHostAddr

func FromHostAddr(host addr.HostAddr, port uint16) *Host

func FromUDPAddr added in v0.5.0

func FromUDPAddr(addr net.UDPAddr) Host

func (*Host) Copy

func (h *Host) Copy() *Host

func (*Host) Host

func (h *Host) Host() addr.HostAddr

func (*Host) String

func (h *Host) String() string

func (*Host) UDP added in v0.5.0

func (h *Host) UDP() *net.UDPAddr

func (*Host) Underlay added in v0.6.0

func (h *Host) Underlay() *net.UDPAddr

Jump to

Keyboard shortcuts

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