codec

package
v0.2.36 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: LGPL-2.1 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	MsgCreator gap.IMsgCreator // 消息对象构建器
}

Decoder 消息包解码器

func DefaultDecoder

func DefaultDecoder() Decoder

DefaultDecoder 默认消息包解码器

func MakeDecoder

func MakeDecoder(mc gap.IMsgCreator) Decoder

MakeDecoder 创建消息包解码器

func (Decoder) Decode

func (d Decoder) Decode(data []byte) (gap.MsgPacket, error)

Decode 解码消息包

type Encoder

type Encoder struct{}

Encoder 消息包编码器

func DefaultEncoder

func DefaultEncoder() Encoder

DefaultEncoder 默认消息包编码器

func MakeEncoder

func MakeEncoder() Encoder

MakeEncoder 创建消息包编码器

func (Encoder) Encode

func (Encoder) Encode(svc, src string, seq int64, msg gap.MsgReader) (ret binaryutil.RecycleBytes, err error)

Encode 编码消息包

Jump to

Keyboard shortcuts

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