优化网络处理器

This commit is contained in:
boyce
2024-06-14 16:21:52 +08:00
parent 9c26c742fe
commit 1014bc54e4
7 changed files with 36 additions and 16 deletions

View File

@@ -3,9 +3,9 @@ package processor
type IProcessor interface {
// must goroutine safe
MsgRoute(clientId string,msg interface{}) error
MsgRoute(clientId string,msg interface{},recyclerReaderBytes func(data []byte)) error
//must goroutine safe
UnknownMsgRoute(clientId string,msg interface{})
UnknownMsgRoute(clientId string,msg interface{},recyclerReaderBytes func(data []byte))
// connect event
ConnectedRoute(clientId string)
DisConnectedRoute(clientId string)