MCPcopy Index your code
hub / github.com/google/gvisor / Merge

Method Merge

pkg/buffer/buffer.go:486–493  ·  view source on GitHub ↗

Merge merges the provided Buffer with this one. The other Buffer will be appended to v, and other will be empty after this operation completes.

(other *Buffer)

Source from the content-addressed store, hash-verified

484// The other Buffer will be appended to v, and other will be empty after this
485// operation completes.
486func (b *Buffer) Merge(other *Buffer) {
487 b.data.PushBackList(&other.data)
488 other.data = ViewList{}
489
490 // Adjust sizes.
491 b.size += other.size
492 other.size = 0
493}
494
495// WriteFromReader writes to the buffer from an io.Reader. A maximum read size
496// of MaxChunkSize is enforced to prevent allocating views from the heap.

Callers 4

TestBufferFunction · 0.95
HandlePacketMethod · 0.95
MakePacketFragmenterFunction · 0.95
TestPacketFragmenterFunction · 0.95

Calls 1

PushBackListMethod · 0.80

Tested by 2

TestBufferFunction · 0.76
TestPacketFragmenterFunction · 0.76