protocolCoder

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MulanPSL-2.0 Imports: 2 Imported by: 0

README

socket协议编解码器的抽象

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMessageFactory

type IMessageFactory interface {
	/*
		@Return reuse 返回的结构ret是否可以重用,如果为true代表可以重用,则不需要调用ret的Decode方法解码,节约性能
	*/
	GetMessage(buf buffer.Buffer) (ret protocol.Protocol, reuse bool)
}

type Securitier

type Securitier interface {
	Encrypt(b []byte) []byte
	Decrypt(b []byte) (bool, []byte)
}

type Serializier

type Serializier interface {
	Serialize(protocol.Protocol) []byte
	Deserialize(b []byte) (bool, protocol.Protocol)
}

Jump to

Keyboard shortcuts

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