pool

package
v0.0.0-...-e6ef893 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(n int) []byte

func Put

func Put(b []byte)

Types

type ByteSteam

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

用来控制二进制流的 主要用在发消息的时候,并数据流用的 如果消息数据加起来没有超过1000字节,那会有性能提升;

func NewByteSteam

func NewByteSteam(buf []byte) *ByteSteam

func (*ByteSteam) AddLen

func (this *ByteSteam) AddLen(l int)

读完数据后,需要设置长度

func (*ByteSteam) Copy

func (this *ByteSteam) Copy(data []byte)

func (*ByteSteam) GetDataBuff

func (this *ByteSteam) GetDataBuff() []byte

获取数据部分

func (*ByteSteam) GetLen

func (this *ByteSteam) GetLen() int

func (*ByteSteam) GetNilBuff

func (this *ByteSteam) GetNilBuff() []byte

获取空数据部分

func (*ByteSteam) ReSet

func (this *ByteSteam) ReSet()

复位

Jump to

Keyboard shortcuts

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