mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-28 01:44:47 +08:00
优化gc
This commit is contained in:
@@ -75,8 +75,10 @@ func (pbRawProcessor *PBRawProcessor) SetRawMsgHandler(handle RawMessageHandler)
|
|||||||
pbRawProcessor.msgHandler = handle
|
pbRawProcessor.msgHandler = handle
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pbRawProcessor *PBRawProcessor) MakeRawMsg(msgType uint16,msg []byte) *PBRawPackInfo {
|
func (pbRawProcessor *PBRawProcessor) MakeRawMsg(msgType uint16,msg []byte,pbRawPackInfo *PBRawPackInfo) {
|
||||||
return &PBRawPackInfo{typ:msgType,rawMsg:msg}
|
pbRawPackInfo.typ = msgType
|
||||||
|
pbRawPackInfo.rawMsg = msg
|
||||||
|
//return &PBRawPackInfo{typ:msgType,rawMsg:msg}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (pbRawProcessor *PBRawProcessor) UnknownMsgRoute(msg interface{}, userData interface{}){
|
func (pbRawProcessor *PBRawProcessor) UnknownMsgRoute(msg interface{}, userData interface{}){
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ type IRawProcessor interface {
|
|||||||
Marshal(msg interface{}) ([]byte, error)
|
Marshal(msg interface{}) ([]byte, error)
|
||||||
|
|
||||||
SetRawMsgHandler(handle RawMessageHandler)
|
SetRawMsgHandler(handle RawMessageHandler)
|
||||||
MakeRawMsg(msgType uint16,msg []byte) *PBRawPackInfo
|
MakeRawMsg(msgType uint16,msg []byte,pbRawPackInfo *PBRawPackInfo)
|
||||||
UnknownMsgRoute(msg interface{}, userData interface{})
|
UnknownMsgRoute(msg interface{}, userData interface{})
|
||||||
ConnectedRoute(userData interface{})
|
ConnectedRoute(userData interface{})
|
||||||
DisConnectedRoute(userData interface{})
|
DisConnectedRoute(userData interface{})
|
||||||
|
|||||||
Reference in New Issue
Block a user