Documentation
¶
Index ¶
- Variables
- func BuildLoginPacket(uin int64, bodyType byte, key, body, extraData []byte) []byte
- func BuildOicqRequestPacket(uin int64, commandId uint16, encrypt IEncryptMethod, key []byte, ...) []byte
- func BuildSsoPacket(seq uint16, appId uint32, commandName, imei string, ...) []byte
- func BuildUniPacket(uin int64, seq uint16, commandName string, encryptType byte, ...) []byte
- type IEncryptMethod
- type ISendingPacket
- type IncomingPacket
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDecryptFailed = errors.New("decrypt failed")
View Source
var ErrInvalidPayload = errors.New("invalid payload")
View Source
var ErrPacketDropped = errors.New("packet dropped")
View Source
var ErrSessionExpired = errors.New("session expired")
View Source
var ErrUnknownFlag = errors.New("unknown flag")
Functions ¶
func BuildLoginPacket ¶
func BuildOicqRequestPacket ¶
func BuildSsoPacket ¶
Types ¶
type ISendingPacket ¶
type IncomingPacket ¶
type IncomingPacket struct { SequenceId uint16 Flag2 byte CommandName string SessionId []byte Payload []byte }
func ParseIncomingPacket ¶
func ParseIncomingPacket(payload, d2key []byte) (*IncomingPacket, error)
func (*IncomingPacket) DecryptPayload ¶
func (pkt *IncomingPacket) DecryptPayload(random, sessionKey []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.