9644352a
zhangqijia
登录服改为http,游戏服改为长连...
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package common
import (
"github.com/golang/protobuf/proto"
"pro2d/actions"
"pro2d/components/net"
"pro2d/protos/pb"
)
type ActionHandler func (msg *net.MsgPkg) (int32, proto.Message)
var ActionMap map[pb.ProtoCode]ActionHandler
func init() {
ActionMap[pb.ProtoCode_HeartRpc] = actions.HeartRpc
ActionMap[pb.ProtoCode_LoginRpc] = actions.LoginRpc
ActionMap[pb.ProtoCode_CreateRpc] = actions.CreateRpc
}
|