pool

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const PoolSize = 64 * 1024
View Source
const PoolSizeCopy = 32 * 1024
View Source
const PoolSizeSmall = 100
View Source
const PoolSizeUdp = 1472

Variables

View Source
var BufPool = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSize)
	},
}
View Source
var BufPoolCopy = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSizeCopy)
	},
}
View Source
var BufPoolMax = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSize)
	},
}
View Source
var BufPoolSmall = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSizeSmall)
	},
}
View Source
var BufPoolUdp = sync.Pool{
	New: func() interface{} {
		return make([]byte, PoolSizeUdp)
	},
}

Functions

func PutBufPoolCopy

func PutBufPoolCopy(buf []byte)

func PutBufPoolUdp

func PutBufPoolUdp(buf []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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