This commit is contained in:
azw 2023-08-17 08:51:31 +08:00
parent 184c7e2f85
commit 757c7586a3
3 changed files with 14 additions and 6 deletions

View File

@ -40,7 +40,7 @@ func (this *App) Update() {
next := this.netMsgQueue.WorkList.Next()
hdr, ok := next.GetData().(*f5.MsgHdr)
if ok {
if hdr.MsgId < 100 {
if hdr.MsgId < f5.WSP_SS_MAX_MSGID {
handler := ss.GetNetMsgHandler(hdr.MsgId)
if handler != nil {
switch handler.HandlerId {

View File

@ -137,10 +137,18 @@ func (this *WSPListener) decodePacket(conn net.Conn, buf []byte, offset *int, bu
func (this *WSPListener) parseNetPkt() {
for {
if hdr, ok := <-this.ch; ok {
hdr.Msg = cs.ParsePb(hdr.MsgId, hdr.Data)
if hdr.Msg != nil {
hdr.Entry.Init(hdr)
app.addNetMsg(hdr)
if hdr.MsgId < f5.WSP_SS_MAX_MSGID {
hdr.Msg = ss.ParsePb(hdr.MsgId, hdr.Data)
if hdr.Msg != nil {
hdr.Entry.Init(hdr)
app.addNetMsg(hdr)
}
} else {
hdr.Msg = cs.ParsePb(hdr.MsgId, hdr.Data)
if hdr.Msg != nil {
hdr.Entry.Init(hdr)
app.addNetMsg(hdr)
}
}
}
}

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit ee97e3ef6b2f59a95675e7cdd7f0c653403eb53e
Subproject commit 096c5046c962a4bcc5873aa5b539a0900e3cf4bd