Пример #1
0
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, "")
	}
}
Пример #2
0
func InitHandlers() {
	Logger.Println(LogConf.CourierServerJob, LogConf.SERVER, "Server Handlers InitHandlers()")

	NetCore.AddMsgHandler(MsgConf.Courier, handleCourier)
	NetCore.AddMsgHandler(MsgConf.Regist, handleServerRegist)
}
Пример #3
0
func InitHandlers() {
	Logger.Println("Courier ServerJob", LogConf.SERVER, "ServerAgent init()")

	NetCore.AddMsgHandler(MsgConf.Regist, handleRegist)
}
Пример #4
0
func init() {
	NetCore.AddMsgHandler(MsgConf.ClientEnterRoom, handleClientEnterRoom)
	NetCore.AddMsgHandler(MsgConf.ClientLeaveRoom, handleClientLeaveRoom)
	NetCore.AddMsgHandler(MsgConf.ClientRoomChat, handleClientRoomChat)
	fmt.Println("xxxxxxxxxxxxxxxx init package Room")
}