Documentation ¶
Overview ¶
Package nettest provides an in-memory socket, Pipe. It can be used in place of net.Dial and net.Listen for faster and more hermetic tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCanceled = errors.New("pipe operation canceled by client")
ErrCanceled indicates that an operation was canceled by the client (e.g. via ctx.Done()).
Functions ¶
This section is empty.
Types ¶
type Pipe ¶
type Pipe struct {
// contains filtered or unexported fields
}
Pipe is an in-memory socket. It provides similar functionality to net.Listen and net.Dial via the Pipe.Accept and Pipe.Connect methods, respectively. It is useful for faster and more deterministic testing of netcode.
Click to show internal directories.
Click to hide internal directories.