bufferpool

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxAddressBufferSize = 259
	MaxSocksBufferSize   = 515
	MaxUdpBufferSize     = 16 * 1024
	MaxTcpBufferSize     = 16 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferPool

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

func NewBufferPool

func NewBufferPool(size int) *BufferPool

func NewBytesBufferPool

func NewBytesBufferPool() *BufferPool

func (*BufferPool) Get

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

func (*BufferPool) GetBytesBuffer

func (bp *BufferPool) GetBytesBuffer() *bytes.Buffer

func (*BufferPool) Put

func (bp *BufferPool) Put(buf *[]byte)

func (*BufferPool) PutBytesBuffer

func (bp *BufferPool) PutBytesBuffer(buf *bytes.Buffer)

Jump to

Keyboard shortcuts

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