Beispiel #1
0
func main() {
	var ccs []gameserver.ClientConfig
	var sc gameserver.ServerConfig
	dh := NewHandle()
	sc.Name = "Hub Server"
	sc.Port = "8081"
	sc.MaxConn = 1024
	gs := gameserver.NewGameServer(ccs, sc, false, dh, dh)
	dh.Remote = gs.Cls
	dh.Local = service.Local
	gs.Start()
}
Beispiel #2
0
func main() {
	var ccs []gameserver.ClientConfig
	cc := new(gameserver.ClientConfig)
	cc.GroupName = "hub"
	cc.ServerId = 1
	cc.ServerAddr = ":8081"
	ccs = append(ccs, *cc)
	var sc gameserver.ServerConfig
	dh := NewHandle()
	sc.Name = "Game Server"
	sc.Port = "8082"
	sc.MaxConn = 1024
	gs := gameserver.NewGameServer(ccs, sc, false, dh, dh)
	dh.Remote = gs.Cls
	dh.Local = service.Local
	gs.Start()
}