public GameApplication(string applicationId, LoadBalancer<IncomingGameServerPeer> loadBalancer) { if (log.IsDebugEnabled) { log.DebugFormat("Creating application: appId={0}", applicationId); } this.ApplicationId = applicationId; this.LoadBalancer = loadBalancer; this.PlayerOnlineCache = new PlayerCache(); this.LobbyFactory = new LobbyFactory(this); }
public LobbyStatsPublisher(PoolFiber fiber, LobbyFactory lobbyFactory, int publishIntervalSeconds, int maxLobbyStatsCount) { this.lobbyFactory = lobbyFactory; this.maxLobbyStatsCount = maxLobbyStatsCount; this.fiber = fiber; this.fiber.Start(); if (publishIntervalSeconds > 0) { this.schedule = this.fiber.ScheduleOnInterval(this.BroadcastStatisticEvent, 0, publishIntervalSeconds * 1000); } }
public LobbyStatsPublisher(LobbyFactory lobbyFactory, int publishIntervalSeconds, int maxLobbyStatsCount) { this.lobbyFactory = lobbyFactory; this.maxLobbyStatsCount = maxLobbyStatsCount; this.subscriber = new HashSet<PeerBase>(); this.fiber = new PoolFiber(); this.fiber.Start(); if (publishIntervalSeconds > 0) { this.schedule = this.fiber.ScheduleOnInterval(this.BroadcastStatisticEvent, 0, publishIntervalSeconds * 1000); } }
public LobbyStatsPublisher(LobbyFactory lobbyFactory, int publishIntervalSeconds, int maxLobbyStatsCount) { this.lobbyFactory = lobbyFactory; this.maxLobbyStatsCount = maxLobbyStatsCount; this.subscriber = new HashSet <PeerBase>(); this.fiber = new PoolFiber(); this.fiber.Start(); if (publishIntervalSeconds > 0) { this.schedule = this.fiber.ScheduleOnInterval(this.BroadcastStatisticEvent, 0, publishIntervalSeconds * 1000); } }
public LobbyStatsPublisher(LobbyFactory lobbyFactory, int publishIntervalSeconds, int maxLobbyStatsCount) : this(new PoolFiber(), lobbyFactory, publishIntervalSeconds, maxLobbyStatsCount) { }