修复解包bug

This commit is contained in:
duanhf2012
2020-01-21 11:30:47 +08:00
parent 263aeb232c
commit 892fd26c5a
3 changed files with 35 additions and 11 deletions

View File

@@ -98,6 +98,12 @@ func (slf *TcpSocketPbService) OnDisconnect(pClient *network.SClient){
}
}
func (slf *TcpSocketPbService) VerifyPackType(packtype uint16) bool{
_,ok := slf.mapMsg[packtype]
return ok
}
func (slf *TcpSocketPbService) OnExceptMsg (pClient *network.SClient,pPack *network.MsgBasePack,err error){
if slf.exceptMsgHandler!=nil {
slf.exceptMsgHandler(pClient,pPack,err)