package nettest

Import Path
	vendor/golang.org/x/net/nettest (on go.dev)

Dependency Relation
	imports 16 packages, and imported by 0 packages

Involved Source Files conntest.go Package nettest provides utilities for network testing. nettest_unix.go
Package-Level Type Names (only one)
/* sort by: | */
MakePipe creates a connection between two endpoints and returns the pair as c1 and c2, such that anything written to c1 is read by c2 and vice-versa. The stop function closes all resources, including c1, c2, and the underlying net.Listener (if there is one), and should not be nil. func TestConn(t *testing.T, mp MakePipe)
Package-Level Functions (total 12)
LocalPath returns a local path that can be used for Unix-domain protocol testing.
LoopbackInterface returns an available logical network interface for loopback test.
MulticastSource returns a unicast IP address on ifi when ifi is an IP multicast-capable network interface. The provided network must be "ip", "ip4" or "ip6".
NewLocalListener returns a listener which listens to a loopback IP address or local file system path. The provided network must be "tcp", "tcp4", "tcp6", "unix" or "unixpacket".
NewLocalPacketListener returns a packet listener which listens to a loopback IP address or local file system path. The provided network must be "udp", "udp4", "udp6" or "unixgram".
RoutedInterface returns a network interface that can route IP traffic and satisfies flags. The provided network must be "ip", "ip4" or "ip6".
SupportsIPv4 reports whether the platform supports IPv4 networking functionality.
SupportsIPv6 reports whether the platform supports IPv6 networking functionality.
SupportsRawSocket reports whether the current session is available to use raw sockets.
TestableAddress reports whether address of network is testable on the current platform configuration.
TestableNetwork reports whether network is testable on the current platform configuration. See func Dial of the standard library for the supported networks.
TestConn tests that a net.Conn implementation properly satisfies the interface. The tests should not produce any false positives, but may experience false negatives. Thus, some issues may only be detected when the test is run multiple times. For maximal effectiveness, run the tests under the race detector.