mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-03-01 00:35:36 +08:00
gate兼容3.7
This commit is contained in:
@@ -2,7 +2,6 @@ package net
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
|
||||
"hk4e/pkg/endec"
|
||||
"hk4e/pkg/logger"
|
||||
)
|
||||
@@ -32,10 +31,11 @@ type KcpMsg struct {
|
||||
ProtoData []byte
|
||||
}
|
||||
|
||||
func DecodeBinToPayload(data []byte, convId uint64, kcpMsgList *[]*KcpMsg, xorKey []byte) {
|
||||
func DecodeBinToPayload(data []byte, session *Session, kcpMsgList *[]*KcpMsg, xorKey []byte) {
|
||||
// xor解密
|
||||
endec.Xor(data, xorKey)
|
||||
DecodeLoop(data, convId, kcpMsgList)
|
||||
DecodeLoop(data, session.conn.GetConv(), kcpMsgList)
|
||||
return
|
||||
}
|
||||
|
||||
func DecodeLoop(data []byte, convId uint64, kcpMsgList *[]*KcpMsg) {
|
||||
|
||||
Reference in New Issue
Block a user