package nettest
import "internal/x/net/nettest"
Package nettest provides utilities for network testing.
Index ¶
Functions ¶
func TestConn ¶
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.
Types ¶
type MakePipe ¶
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.
Source Files ¶
- Version
- v1.12.8
- Published
- Aug 13, 2019
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- 1 minute ago –
Tools for package owners.