Documentation ¶
Overview ¶
通讯协议处理,主要处理封包和解包的过程
Index ¶
- Constants
- func BytesToInt(b []byte) int32
- func BytesTouInt32(b []byte) uint32
- func CheckECC(data []byte) uint32
- func GetUniq() int
- func IntToBytes(n int32) []byte
- func Packet(message []byte) []byte
- func UInt32ToBytes(n uint32) []byte
- func Unpack(buffer []byte, readerChannel chan []byte) (leftbuffer []byte)
Constants ¶
View Source
const ( ConstHeader = "SeanCommu" ConstHeaderLength int32 = 9 ConstSaveDataLength int32 = 4 ConstEndCheckECCLength int32 = 4 TempToken = "e675d1b7e23c8a9ca3a3479d6cf29232" )
View Source
const ( ConstPackNoHeader = 0 ConstPackHasHeader = 1 )
View Source
const (
NAME_PREFIX = "User "
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.