bytequeue

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 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 ByteQueue

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

ByteQueue is a queue of bytes. Data is added to the end of the queue via Write() or ReadNFrom(), and is removed via Pop(). The contents of the queue can be accessed via Peek().

func (*ByteQueue) Peek

func (bq *ByteQueue) Peek() []byte

Peek returns a slice with the data available in the queue.

func (*ByteQueue) Pop

func (bq *ByteQueue) Pop(n int)

Pop removes n bytes from the beginning of the queue.

func (*ByteQueue) Write

func (bq *ByteQueue) Write(data []byte) (int, error)

Write adds data to the end of the queue.

Jump to

Keyboard shortcuts

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