Example #1
0
 public void StartSessionWatcher(GameSession gameSession)
 {
     if (gameSession.GameChannel != null)
     {
         var writer = new MagFilter.Channels.ChannelWriter();
         if (!writer.IsWatcherEnabled(gameSession.GameChannel))
         {
             writer.StartWatcher(gameSession.GameChannel);
             gameSession.GameChannel.FileWatcher.Changed += (sender, e) => OnChannelFileChanged(gameSession, sender, e);
         }
     }
 }
Example #2
0
 private void SendAndReceiveCommands()
 {
     foreach (var gameSession in _map.GetAllGameSessions())
     {
         if (gameSession.GameChannel != null)
         {
             if (gameSession.GameChannel.NeedsToWrite)
             {
                 var writer = new MagFilter.Channels.ChannelWriter();
                 writer.WriteCommandsToFile(gameSession.GameChannel);
             }
             if (true)
             {
                 var writer = new MagFilter.Channels.ChannelWriter();
                 writer.ReadCommandsFromFile(gameSession.GameChannel);
             }
         }
     }
 }
Example #3
0
        public void StopSessionWatcher()
        {
            var writer = new MagFilter.Channels.ChannelWriter();

            writer.StopWatcher(this.GameChannel);
        }