ringbuffer

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteToInt

func ByteToInt(buf []byte) int

func IntToByte

func IntToByte(n int) []byte

Types

type Ringbuffer

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

func NewRingbuffer

func NewRingbuffer(size int) *Ringbuffer

func (*Ringbuffer) GetUse

func (r *Ringbuffer) GetUse() int

func (*Ringbuffer) Read

func (r *Ringbuffer) Read(b []byte) int

func (*Ringbuffer) Write

func (r *Ringbuffer) Write(b []byte) bool

Write 丢弃新写入策略

func (*Ringbuffer) WriteCover

func (r *Ringbuffer) WriteCover(b []byte) bool

WriteCover 覆盖未读数据包策略

Jump to

Keyboard shortcuts

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