listbuffer

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteBuffer

type ByteBuffer struct {
	Buf *bytebuffer.ByteBuffer
	// contains filtered or unexported fields
}

func (*ByteBuffer) IsEmpty

func (b *ByteBuffer) IsEmpty() bool

IsEmpty ByteBuffer是否为空

func (*ByteBuffer) Len

func (b *ByteBuffer) Len() int

Len 返回 ByteBuffer 的长度

type ListBuffer

type ListBuffer struct {
	// contains filtered or unexported fields
}

ListBuffer is a linked list of ByteBuffer.

func (*ListBuffer) Bytes

func (l *ListBuffer) Bytes() int64

Bytes returns the amount of bytes in this list.

func (*ListBuffer) DiscardBytes

func (l *ListBuffer) DiscardBytes(n int)

DiscardBytes removes some nodes based on n.

func (*ListBuffer) IsEmpty

func (l *ListBuffer) IsEmpty() bool

IsEmpty reports whether l is empty.

func (*ListBuffer) Len

func (l *ListBuffer) Len() int

Len returns the length of the list.

func (*ListBuffer) PeekBytesList

func (l *ListBuffer) PeekBytesList() [][]byte

PeekBytesList assembles the [][]byte based on the list of ByteBuffer, it won't remove these nodes from l until DiscardBytes() is called.

func (*ListBuffer) PeekBytesListWithBytes

func (l *ListBuffer) PeekBytesListWithBytes(bs ...[]byte) [][]byte

PeekBytesListWithBytes is like PeekBytesList but accepts [][]byte and puts them onto head.

func (*ListBuffer) Pop

func (l *ListBuffer) Pop() *ByteBuffer

Pop returns and removes the head of l. If l is empty, it returns nil.

func (*ListBuffer) PushBack

func (l *ListBuffer) PushBack(b *ByteBuffer)

PushBack adds a new node to the tail of l.

func (*ListBuffer) PushBytesBack

func (l *ListBuffer) PushBytesBack(p []byte)

PushBytesBack is a wrapper of PushBack, which accepts []byte as its argument.

func (*ListBuffer) PushBytesFront

func (l *ListBuffer) PushBytesFront(p []byte)

PushBytesFront is a wrapper of PushFront, which accepts []byte as its argument.

func (*ListBuffer) PushFront

func (l *ListBuffer) PushFront(b *ByteBuffer)

PushFront adds the new node to the head of l.

func (*ListBuffer) Reset

func (l *ListBuffer) Reset()

Reset removes all elements from this list.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL