This commit is contained in:
aozhiwei 2023-08-11 13:13:35 +08:00
parent 4a063bd14e
commit 62d74bb2c2
4 changed files with 7 additions and 8 deletions

View File

@ -15,5 +15,5 @@ func (this *PlayerMgr_) CMLogin(hdr *f5.MsgHdr, msg *cs.CMLogin) {
serverInfo := "192.168.100.39:1000"
rspMsg := &cs.SMLogin{}
rspMsg.ServerInfo = &serverInfo
WSPListener.sendProxyMsg(hdr.Conn, 0, rspMsg)
WSPListener.sendProxyMsg(hdr.Conn, hdr.SocketHandle, rspMsg)
}

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit 6aa5ba1546beb17e9dc6055fe672dce1d4164686
Subproject commit 0cea5671752bc0753d61aae993b8aa2b0df0ae18

2
third_party/q5 vendored

@ -1 +1 @@
Subproject commit 607a4887d0c5c6d92b402ae385cc4c6e21067cf8
Subproject commit b62848491f7eb15ef46a53d9ad15e32320d159e0

View File

@ -82,12 +82,11 @@ class ClientNet {
async #onParsePacket() {
let offset = 0;
console.log('onParsepacket');
while (this.recvBuf.length > offset + 12) {
const msgSize = this.recvBuf.readUInt32LE(offset + 0);
const msgId = this.recvBuf.readUInt16LE(offset + 4);
const magicCode = this.recvBuf.readUInt16LE(offset + 6);
const seqId = this.recvBuf.readUInt32LE(offset + 8);
const msgSize = this.recvBuf.readUInt16LE(offset + 0);
const msgId = this.recvBuf.readUInt16LE(offset + 2);
const seqId = this.recvBuf.readUInt32LE(offset + 4);
const magicCode = this.recvBuf.readUInt16LE(offset + 8);
if (this.recvBuf.length >= offset + 12 + msgSize) {
await this.#processMsg(msgId,
this.recvBuf.slice