优化架构

This commit is contained in:
huangxiaolei
2022-11-23 18:05:11 +08:00
parent 3efed3defe
commit 43403202b5
6760 changed files with 33748 additions and 554768 deletions

23
protocol/cmd/net_msg.go Normal file
View File

@@ -0,0 +1,23 @@
package cmd
import pb "google.golang.org/protobuf/proto"
const (
NormalMsg = iota
UserRegNotify
UserLoginNotify
UserOfflineNotify
ClientRttNotify
ClientTimeNotify
)
type NetMsg struct {
UserId uint32 `msgpack:"UserId"`
EventId uint16 `msgpack:"EventId"`
CmdId uint16 `msgpack:"CmdId"`
ClientSeq uint32 `msgpack:"ClientSeq"`
PayloadMessage pb.Message `msgpack:"-"`
PayloadMessageData []byte `msgpack:"PayloadMessageData"`
ClientRtt uint32 `msgpack:"ClientRtt"`
ClientTime uint32 `msgpack:"ClientTime"`
}