util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferPool

type BufferPool struct {
	Buffers chan []byte
	// contains filtered or unexported fields
}

字节缓存池

func NewBufferPool

func NewBufferPool(bufferSize uint, bufferCount uint) *BufferPool

实例化buffer

func (*BufferPool) Clear

func (b *BufferPool) Clear()

清理

func (*BufferPool) Get

func (b *BufferPool) Get() []byte

获取

func (*BufferPool) Put

func (b *BufferPool) Put(data []byte)

回收

Jump to

Keyboard shortcuts

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