import "v2ray.com/core/transport/pipe"
impl.go pipe.go reader.go writer.go
New creates a new Reader and Writer that connects to each other.
type Option func(*pipeOption)
Option for creating new Pipes.
DiscardOverflow returns an Option for Pipe to discard writes if full.
OptionsFromContext returns a list of Options from context.
WithSizeLimit returns an Option for Pipe to have the given size limit.
WithoutSizeLimit returns an Option for Pipe to have no size limit.
type Reader struct {
// contains filtered or unexported fields
}
Reader is a buf.Reader that reads content from a pipe.
Interrupt implements common.Interruptible.
func (r *Reader) ReadMultiBuffer() (buf.MultiBuffer, error)
ReadMultiBuffer implements buf.Reader.
ReadMultiBufferTimeout reads content from a pipe within the given duration, or returns buf.ErrTimeout otherwise.
type Writer struct {
// contains filtered or unexported fields
}
Writer is a buf.Writer that writes data into a pipe.
Close implements io.Closer. After the pipe is closed, writing to the pipe will return io.ErrClosedPipe, while reading will return io.EOF.
Interrupt implements common.Interruptible.
func (w *Writer) WriteMultiBuffer(mb buf.MultiBuffer) error
WriteMultiBuffer implements buf.Writer.
Package pipe imports 11 packages (graph) and is imported by 66 packages. Updated 2019-03-29. Refresh now. Tools for package owners.