Documentation ¶
Overview ¶
Package stdnet implements the transport.Net interface using methods from Go's standard net package.
Index ¶
- type Net
- func (n *Net) CreateDialer(d *net.Dialer) transport.Dialer
- func (n *Net) Dial(network, address string) (net.Conn, error)
- func (n *Net) DialTCP(network string, laddr, raddr *net.TCPAddr) (transport.TCPConn, error)
- func (n *Net) DialUDP(network string, laddr, raddr *net.UDPAddr) (transport.UDPConn, error)
- func (n *Net) InterfaceByIndex(index int) (*transport.Interface, error)
- func (n *Net) InterfaceByName(name string) (*transport.Interface, error)
- func (n *Net) Interfaces() ([]*transport.Interface, error)
- func (n *Net) ListenPacket(network string, address string) (net.PacketConn, error)
- func (n *Net) ListenTCP(network string, laddr *net.TCPAddr) (transport.TCPListener, error)
- func (n *Net) ListenUDP(network string, locAddr *net.UDPAddr) (transport.UDPConn, error)
- func (n *Net) ResolveIPAddr(network, address string) (*net.IPAddr, error)
- func (n *Net) ResolveTCPAddr(network, address string) (*net.TCPAddr, error)
- func (n *Net) ResolveUDPAddr(network, address string) (*net.UDPAddr, error)
- func (n *Net) UpdateInterfaces() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Net ¶
type Net struct {
// contains filtered or unexported fields
}
Net is an implementation of the net.Net interface based on functions of the standard net package.
func (*Net) CreateDialer ¶
CreateDialer creates an instance of vnet.Dialer
func (*Net) InterfaceByIndex ¶
InterfaceByIndex returns the interface specified by index.
On Solaris, it returns one of the logical network interfaces sharing the logical data link; for more precision use InterfaceByName.
func (*Net) InterfaceByName ¶
InterfaceByName returns the interface specified by name.
func (*Net) Interfaces ¶
Interfaces returns a slice of interfaces which are available on the system
func (*Net) ListenPacket ¶
ListenPacket announces on the local network address.
func (*Net) ResolveIPAddr ¶
ResolveIPAddr returns an address of IP end point.
func (*Net) ResolveTCPAddr ¶
ResolveTCPAddr returns an address of TCP end point.
func (*Net) ResolveUDPAddr ¶
ResolveUDPAddr returns an address of UDP end point.
func (*Net) UpdateInterfaces ¶
UpdateInterfaces updates the internal list of network interfaces and associated addresses.