Versions in this module Expand all Collapse all v0 v0.1.1 Jul 6, 2023 Changes in this version + var ErrInterfaceNotFound = errors.New("interface not found") + var ErrNoAddressAssigned = errors.New("no address assigned") + var ErrNotSupported = errors.New("not supported yey") + var ErrNotUDPAddress = errors.New("not a UDP address") + type Dialer interface + Dial func(network, address string) (net.Conn, error) + type Interface struct + func NewInterface(ifc net.Interface) *Interface + func (ifc *Interface) AddAddress(addr net.Addr) + func (ifc *Interface) Addrs() ([]net.Addr, error) + type Net interface + CreateDialer func(dialer *net.Dialer) Dialer + Dial func(network, address string) (net.Conn, error) + DialTCP func(network string, laddr, raddr *net.TCPAddr) (TCPConn, error) + DialUDP func(network string, laddr, raddr *net.UDPAddr) (UDPConn, error) + InterfaceByIndex func(index int) (*Interface, error) + InterfaceByName func(name string) (*Interface, error) + Interfaces func() ([]*Interface, error) + ListenPacket func(network string, address string) (net.PacketConn, error) + ListenTCP func(network string, laddr *net.TCPAddr) (TCPListener, error) + ListenUDP func(network string, locAddr *net.UDPAddr) (UDPConn, error) + ResolveIPAddr func(network, address string) (*net.IPAddr, error) + ResolveTCPAddr func(network, address string) (*net.TCPAddr, error) + ResolveUDPAddr func(network, address string) (*net.UDPAddr, error) + type TCPConn interface + CloseRead func() error + CloseWrite func() error + ReadFrom func(r io.Reader) (int64, error) + SetKeepAlive func(keepalive bool) error + SetKeepAlivePeriod func(d time.Duration) error + SetLinger func(sec int) error + SetNoDelay func(noDelay bool) error + SetReadBuffer func(bytes int) error + SetWriteBuffer func(bytes int) error + type TCPListener interface + AcceptTCP func() (TCPConn, error) + SetDeadline func(t time.Time) error + type UDPConn interface + Close func() error + LocalAddr func() net.Addr + Read func(b []byte) (n int, err error) + ReadFrom func(p []byte) (n int, addr net.Addr, err error) + ReadFromUDP func(b []byte) (n int, addr *net.UDPAddr, err error) + ReadMsgUDP func(b, oob []byte) (n, oobn, flags int, addr *net.UDPAddr, err error) + RemoteAddr func() net.Addr + SetDeadline func(t time.Time) error + SetReadBuffer func(bytes int) error + SetReadDeadline func(t time.Time) error + SetWriteBuffer func(bytes int) error + SetWriteDeadline func(t time.Time) error + Write func(b []byte) (n int, err error) + WriteMsgUDP func(b, oob []byte, addr *net.UDPAddr) (n, oobn int, err error) + WriteTo func(p []byte, addr net.Addr) (n int, err error) + WriteToUDP func(b []byte, addr *net.UDPAddr) (int, error)