Documentation ¶
Index ¶
Constants ¶
View Source
const PoolSize = 64 * 1024
View Source
const PoolSizeCopy = 32 << 10
View Source
const PoolSizeSmall = 100
View Source
const PoolSizeUdp = 1472
Variables ¶
View Source
var BufPoolCopy = sync.Pool{ New: func() interface{} { buf := make([]byte, PoolSizeCopy) return &buf }, }
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 GetBufPoolCopy ¶ added in v0.18.1
func GetBufPoolCopy() []byte
func PutBufPoolCopy ¶
func PutBufPoolCopy(buf []byte)
func PutBufPoolMax ¶ added in v0.0.16
func PutBufPoolMax(buf []byte)
func PutBufPoolUdp ¶
func PutBufPoolUdp(buf []byte)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.