Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrTimeout = errors.New("timeout") ErrReadTimeout = fmt.Errorf("read %w", ErrTimeout) ErrWriteTimeout = fmt.Errorf("write %w", ErrTimeout) )
Functions ¶
Types ¶
type Conn ¶
type Conn interface { io.Reader io.Writer io.Closer SetDeadline(t time.Time) error SetReadDeadline(t time.Time) error SetWriteDeadline(t time.Time) error // SetReadBlock blocks or unblocks the Read method of this Conn. // It reports an error if the existing value matches the new value, // or if the Conn has been Closed. SetReadBlock(bool) error // SetWriteBlock blocks or unblocks the Write method of this Conn. // It reports an error if the existing value matches the new value, // or if the Conn has been Closed. SetWriteBlock(bool) error }
Conn is a bi-directional in-memory stream that looks like a TCP net.Conn.
type Pipe ¶
type Pipe struct {
// contains filtered or unexported fields
}
Pipe implements an in-memory FIFO with timeouts.
func (*Pipe) SetReadDeadline ¶
SetReadDeadline sets the deadline for future Read calls.
func (*Pipe) SetWriteDeadline ¶
SetWriteDeadline sets the deadline for future Write calls.
Click to show internal directories.
Click to hide internal directories.