Esempio n. 1
0
        public async Task Actualize(int peersCount)
        {
            var request = new ActualizeServerOnMatchMakerRequest(_config.GetIdentity(), _config.ServerName,
                                                                 _config.Region, _statsProvider.GetPeerCount(), _config.BindToPortHttp, 0);
            var response =
                await _requestSender.SendRequest <ActualizeServerOnMatchMakerResponse>(_matchMakerInfoProvider.MatchMakerUrl, request);

            if (!response.Success)
            {
                _logger.Error($"GameToMmServerActualizer error: {response.Message}");
            }
        }
Esempio n. 2
0
 public void Start(int actualizationPeriodMs)
 {
     _actualizeTask = _taskScheduler.ScheduleOnInterval(async() =>
     {
         //actualize
         await Actualize(_statsProvider.GetPeerCount());
     }, 0, actualizationPeriodMs);
 }