protocolCoder

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 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.ProtocolBuffer) (ret protocol.IProtocol, reuse bool)
}

type Securitier

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

type Serializier

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

Jump to

Keyboard shortcuts

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