package
3.50.2+incompatible
Repository: https://github.com/delphit430/v2ray-core.git
Documentation: pkg.go.dev
# Functions
Copy dumps all payload from reader to writer or stops when an error occurs.
No description provided by the author
CountSize is a CopyOption that sums the total size of data copied into the given SizeCounter.
No description provided by the author
No description provided by the author
New creates a Buffer with 0 length and 2K capacity.
NewBufferedWriter creates a new BufferedWriter.
NewMultiBufferCap creates a new MultiBuffer instance.
NewMultiBufferValue wraps a list of Buffers into MultiBuffer.
NewReader creates a new Reader.
No description provided by the author
NewWriter creates a new Writer.
ReadAllToBytes reads all content from the reader into a byte array, until EOF.
ReadAllToMultiBuffer reads all content from the reader into a MultiBuffer, until EOF.
ReadFrom creates a Supplier to read from a given io.Reader.
ReadFullFrom creates a Supplier to read full buffer from a given io.Reader.
UpdateActivity is a CopyOption to update activity on each data copy operation.
WriteAllBytes ensures all bytes are written into the given writer.
# Constants
Size of a regular buffer.
# Variables
Discard is a Writer that swallows all contents written in.
DiscardBytes is an io.Writer that swallows all contents written in.
No description provided by the author
ErrReadTimeout is an error that happens with IO timeout.
# Structs
Buffer is a recyclable allocation of a byte array.
BufferedReader is a Reader that keeps its internal buffer.
BufferedWriter is a Writer with internal buffer.
BufferToBytesWriter is a Writer that writes alloc.Buffer into underlying writer.
No description provided by the author
SequentialWriter is a Writer that writes MultiBuffer sequentially into the underlying io.Writer.
SingleReader is a Reader that read one Buffer every time.
SizeCounter is for counting bytes copied by Copy().
# Interfaces
Reader extends io.Reader with MultiBuffer.
TimeoutReader is a reader that returns error if Read() operation takes longer than the given timeout.
Writer extends io.Writer with MultiBuffer.
# Type aliases
CopyOption is an option for copying data.
MultiBuffer is a list of Buffers.
Supplier is a writer that writes contents into the given buffer.