package netutil
import "aqwari.net/net/styx/internal/netutil"
Package netutil contains useful types for testing network services.
Index ¶
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.
func (*PipeListener) Dial ¶
func (l *PipeListener) Dial() (net.Conn, error)
Source Files ¶
listener.go
- Version
- v0.0.0-20221011015736-bf55d759d56b (latest)
- Published
- Oct 11, 2022
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 4 days ago –
Tools for package owners.