util

package
v1.8.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encode

func Encode(bytes []byte) []byte

Encode 编码数据

func NewHeaderLenCodecFactory

func NewHeaderLenCodecFactory(headerLen, bodyMaxLen int) *headerLenCodecFactory

NewHeaderLenCodecFactory 创建解码器工厂

Types

type Codec

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

Codec 编解码器,用来处理tcp的拆包粘包

func (*Codec) Read

func (c *Codec) Read() ([]byte, error)

Read 读取数据,非多协程安全

Jump to

Keyboard shortcuts

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