1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 19:17:38 +08:00
2021-12-27 15:41:59 +08:00

31 lines
588 B
Go

package network
type RequestType uint32
const (
RequestTypeLogin = 0x0A
RequestTypeSimple = 0x0B
)
var emptyKey = make([]byte, 16)
type EncryptType uint32
const (
EncryptTypeNoEncrypt EncryptType = iota // 0x00
EncryptTypeD2Key // 0x01
EncryptTypeEmptyKey // 0x02
)
type Request struct {
Type RequestType
EncryptType EncryptType
SequenceID int32
Uin int64
CommandName string
Body []byte
Params Params
Decode func(*Response) (interface{}, error) // callAndDecode use this function to decode response
}