func start() { NetCore.AddMsgHandler(MsgConf.Regist, handleRegist) NetCore.AddMsgHandler(MsgConf.HeartBeat2, handleHeartBeat2) for i := 0; i < ROBOT_NUM; i++ { robots[i] = nil } for i := 0; i < ROBOT_NUM; i++ { NetCore.NewAgent(&robots[i], "127.0.0.1"+Commen.GetConfig(Commen.WorkerAddr), NetConf.Client, "") } }
func InitHandlers() { Logger.Println(LogConf.CourierServerJob, LogConf.SERVER, "Server Handlers InitHandlers()") NetCore.AddMsgHandler(MsgConf.Courier, handleCourier) NetCore.AddMsgHandler(MsgConf.Regist, handleServerRegist) }
func InitHandlers() { Logger.Println("Courier ServerJob", LogConf.SERVER, "ServerAgent init()") NetCore.AddMsgHandler(MsgConf.Regist, handleRegist) }
func init() { NetCore.AddMsgHandler(MsgConf.ClientEnterRoom, handleClientEnterRoom) NetCore.AddMsgHandler(MsgConf.ClientLeaveRoom, handleClientLeaveRoom) NetCore.AddMsgHandler(MsgConf.ClientRoomChat, handleClientRoomChat) fmt.Println("xxxxxxxxxxxxxxxx init package Room") }