util

package
v0.0.0-...-385b115 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RingBuffer

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

func NewRingBuffer

func NewRingBuffer(_buffer_size int) RingBuffer

func (*RingBuffer) GetCapacity

func (rb *RingBuffer) GetCapacity() int

func (*RingBuffer) GetHeadPos

func (rb *RingBuffer) GetHeadPos() int

func (*RingBuffer) GetLength

func (rb *RingBuffer) GetLength() int

func (*RingBuffer) GetTailPos

func (rb *RingBuffer) GetTailPos() int

func (*RingBuffer) IsEmpty

func (rb *RingBuffer) IsEmpty() bool

当cur_size等于0时,head和tail应相等

func (*RingBuffer) IsFull

func (rb *RingBuffer) IsFull() bool

func (*RingBuffer) Pop

func (rb *RingBuffer) Pop(pop_size int) (bool, []byte, []byte)

func (*RingBuffer) Push

func (rb *RingBuffer) Push(data []byte) bool

Jump to

Keyboard shortcuts

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