Example #1
0
func main() {
	defer OnClose()

	runtime.GOMAXPROCS(5)

	log.SetFlags(log.Ltime | log.Lshortfile)
	log.SetPrefix("[Log]")

	D.InitializeDatabase()
	D.CreateDatabase()

	D.LoadData()

	SG.ReadConfig()

	Server = new(GServer)
	Server.Start("GameServer", SG.Config.GSConfig.IP, SG.Config.GSConfig.Port, SG.Config.GSConfig.WANIP)

	//go WebAdmin.Start(GS.Server.Log)
	go ListenSignals()

	CMD()
}
Example #2
0
func main() {
	defer OnClose()

	runtime.GOMAXPROCS(5)

	log.SetFlags(log.Ltime | log.Lshortfile)
	log.SetPrefix("[Log]")

	D.InitializeDatabase()
	D.CreateDatabase()

	//Note: do this in the game server?
	D.LoadData()

	SG.ReadConfig()

	Server = new(LServer)
	Server.Start("LoginServer", SG.Config.LSConfig.IP, SG.Config.LSConfig.Port, SG.Config.LSConfig.WANIP)

	go ListenSignals()

	CMD()
}