netc

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddrFromNet added in v0.9.0

func AddrFromNet(addr net.Addr) (netip.Addr, error)

func AddrPortFromNet added in v0.9.0

func AddrPortFromNet(addr net.Addr) (netip.AddrPort, error)

func GenServerName added in v0.7.0

func GenServerName(prefix string) string

func IPFromNet added in v0.9.0

func IPFromNet(addr net.Addr) (net.IP, error)

func LocalAddrs

func LocalAddrs() ([]netip.Addr, error)

func ParseCIDR added in v0.5.0

func ParseCIDR(str string) (netip.Prefix, error)

func ParseCIDRs added in v0.5.0

func ParseCIDRs(strs []string) ([]netip.Prefix, error)

Types

type Joiner added in v0.7.0

type Joiner struct {
	Accept func(context.Context) (net.Conn, error)
	Dial   func(context.Context) (net.Conn, error)
	Join   func(ctx context.Context, acceptConn net.Conn, dialConn net.Conn)
}

func (*Joiner) Run added in v0.7.0

func (j *Joiner) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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