This commit is contained in:
boyce
2020-12-09 17:59:50 +08:00
parent 9bad0037aa
commit 73532ce154
2 changed files with 5 additions and 3 deletions

View File

@@ -75,8 +75,10 @@ func (pbRawProcessor *PBRawProcessor) SetRawMsgHandler(handle RawMessageHandler)
pbRawProcessor.msgHandler = handle
}
func (pbRawProcessor *PBRawProcessor) MakeRawMsg(msgType uint16,msg []byte) *PBRawPackInfo {
return &PBRawPackInfo{typ:msgType,rawMsg:msg}
func (pbRawProcessor *PBRawProcessor) MakeRawMsg(msgType uint16,msg []byte,pbRawPackInfo *PBRawPackInfo) {
pbRawPackInfo.typ = msgType
pbRawPackInfo.rawMsg = msg
//return &PBRawPackInfo{typ:msgType,rawMsg:msg}
}
func (pbRawProcessor *PBRawProcessor) UnknownMsgRoute(msg interface{}, userData interface{}){

View File

@@ -23,7 +23,7 @@ type IRawProcessor interface {
Marshal(msg interface{}) ([]byte, error)
SetRawMsgHandler(handle RawMessageHandler)
MakeRawMsg(msgType uint16,msg []byte) *PBRawPackInfo
MakeRawMsg(msgType uint16,msg []byte,pbRawPackInfo *PBRawPackInfo)
UnknownMsgRoute(msg interface{}, userData interface{})
ConnectedRoute(userData interface{})
DisConnectedRoute(userData interface{})