Versions in this module Expand all Collapse all v0 v0.55.0 May 4, 2024 v0.54.0 Apr 4, 2024 Changes in this version + var ErrHostAddress = errors.New("invalid host address") + var ErrReadTimeout = errors.New(`read timeout`) + func IsHostnameValid(hname []byte, isFQDN bool) bool + func IsIPv4(ip net.IP) bool + func IsIPv6(ip net.IP) bool + func IsTypeTCP(t Type) bool + func IsTypeTransport(t Type) bool + func IsTypeUDP(t Type) bool + func ParseIPPort(address string, defPort uint16) (host string, ip net.IP, port uint16) + func ParseTCPAddr(address string, defPort uint16) (udp *net.TCPAddr, err error) + func ParseUDPAddr(address string, defPort uint16) (udp *net.UDPAddr, err error) + func Read(conn net.Conn, bufsize int, timeout time.Duration) (packet []byte, err error) + func ToDotIPv6(ip net.IP) (out []byte) + func WaitAlive(network, address string, timeout time.Duration) (err error) + type Poll interface + Close func() + RegisterRead func(fd int) (err error) + UnregisterRead func(fd int) (err error) + WaitRead func() (fds []int, err error) + WaitReadEvents func() (events []PollEvent, err error) + func NewPoll() (Poll, error) + type PollEvent interface + Descriptor func() uint64 + Event func() any + type ResolvConf struct + Attempts int + Domain string + NDots int + NameServers []string + OptMisc map[string]bool + Search []string + Timeout int + func NewResolvConf(path string) (rc *ResolvConf, err error) + func (rc *ResolvConf) Init(src string) + func (rc *ResolvConf) PopulateQuery(dname string) (queries []string) + func (rc *ResolvConf) WriteTo(w io.Writer) (n int64, err error) + type Type uint16 + const TypeIP + const TypeIP4 + const TypeIP6 + const TypeInvalid + const TypeTCP + const TypeTCP4 + const TypeTCP6 + const TypeUDP + const TypeUDP4 + const TypeUDP6 + const TypeUnix + const TypeUnixGram + const TypeUnixPacket + func ConvertStandard(network string) Type