Documentation ¶
Overview ¶
Package memipnet provides hermetic net package TCP and UDP loopback implementations.
Index ¶
- type Stack
- func (s *Stack) Close()
- func (s *Stack) Dial(network, address string) (net.Conn, error)
- func (s *Stack) DialContext(ctx context.Context, network, address string) (net.Conn, error)
- func (s *Stack) Listen(ctx context.Context, network, address string) (net.Listener, error)
- func (s *Stack) ListenPacket(ctx context.Context, network, address string) (net.PacketConn, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
A Stack is a hermetic network stack emulator.
func (*Stack) Close ¶
func (s *Stack) Close()
Close releases all resources owned by this Stack.
Close does no prevent additional uses of this Stack.
func (*Stack) Dial ¶
Dial connects to the address on the named network.
See net.Dial for a description of the network and address parameters.
func (*Stack) DialContext ¶
DialContext connects to the address on the named network using the provided context.
See net.Dial for a description of the network and address parameters.
func (*Stack) Listen ¶
Listen announces on the emulated local network address.
See net.Listen for a description of the network and address parameters.
func (*Stack) ListenPacket ¶
ListenPacket announces on the emulated local network address.
See net.ListenPacket for a description of the network and address parameters.