Documentation ¶
Overview ¶
Package netutil contains useful types for testing network services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PipeListener ¶
type PipeListener struct {
// contains filtered or unexported fields
}
PipeListener is a net.Listener that does not need permission to bind to a port or create a socket file. Useful for testing in heavily sandboxed environments or intra-process communication.
func (*PipeListener) Accept ¶
func (l *PipeListener) Accept() (net.Conn, error)
Accept accepts a new connection on a PipeListener. Accept blocks until a new connection is made or the PipeListener is closed.
func (*PipeListener) Addr ¶
func (l *PipeListener) Addr() net.Addr
func (*PipeListener) Close ¶
func (l *PipeListener) Close() error
Close closes a PipeListener. The returned error will always be nil.
Click to show internal directories.
Click to hide internal directories.