Documentation ¶
Index ¶
- type NetStack
- type NetUserStack
- func (nus *NetUserStack) DialContextTCP(ctx context.Context, addr net.IP, port uint16) (net.Conn, error)
- func (nus *NetUserStack) DialTCP(addr net.IP, port uint16) (net.Conn, error)
- func (nus *NetUserStack) DialUDP(lport uint16, addr net.IP, rport uint16) (UDPConn, error)
- func (nus *NetUserStack) ListenTCP(port uint16) (net.Listener, error)
- type NewStackFunc
- type UDPConn
- type UserStack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetStack ¶
NetStack represents an IPv6 network stack
func NewStackChannel ¶
NewStackChannel creates a new network stack
func NewStackDefault ¶
type NetUserStack ¶
type NetUserStack struct{}
NetUserStack provides a UserStack that is a thin wrapper around the Go net library. Used for testing.
func (*NetUserStack) DialContextTCP ¶
type NewStackFunc ¶
NewStackFunc is the type of a function that creates a new stack
type UDPConn ¶
type UDPConn interface { net.Conn net.PacketConn }
UDPConn is functionally equivalent to net.UDPConn
type UserStack ¶
type UserStack interface { // DialTCP dials a TCP connection over the network stack. DialTCP(addr net.IP, port uint16) (net.Conn, error) // DialContextTCP dials a TCP connection over the network stack, using a context. DialContextTCP(ctx context.Context, addr net.IP, port uint16) (net.Conn, error) // ListenTCP opens a TCP listener over the network stack. ListenTCP(port uint16) (net.Listener, error) // DialUDP opens a UDP sender or receiver over the network stack. If addr is nil, // rport will be ignored and this socket will only listen on lport. DialUDP(lport uint16, addr net.IP, rport uint16) (UDPConn, error) }
UserStack provides the methods that allow user apps to communicate over a network stack
Click to show internal directories.
Click to hide internal directories.