package
2.51.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.
CountSize is a CopyOption that sums the total size of data copied into the given SizeCounter.
IgnoreReaderError is a CopyOption that ignores errors from reader.
IgnoreWriterError is a CopyOption that ignores errors from writer.
New creates a Buffer with 0 length and 8K capacity.
No description provided by the author
NewBufferedWriter creates a new BufferedWriter.
No description provided by the author
No description provided by the author
NewLocal creates and returns a buffer with 0 length and given capacity on current thread.
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
NewSyncPool creates a SyncPool with given buffer size.
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.
ReadAtLeastFrom create a Supplier to read at least size bytes from the given io.Reader.
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.
# 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.
ErrReadTimeout is an error that happens with IO timeout.
# Structs
Buffer is a recyclable allocation of a byte array.
No description provided by the author
BufferedWriter is a Writer with internal buffer.
BufferToBytesWriter is a Writer that writes alloc.Buffer into underlying writer.
BytesToBufferReader is a Reader that adjusts its reading speed automatically.
No description provided by the author
SyncPool is a buffer pool based on sync.Pool.
# Interfaces
Pool provides functionality to generate and recycle buffers on demand.
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.