Example #1
0
 static void Main(string[] args)
 {
     try
     {
         GameServerListManager.Initialize();
         var server = new GameProxy();
         Console.WriteLine("Press Enter to exit...");
         Console.ReadLine();
     }
     catch (Exception ex)
     {
         TraceLog.WriteError("Main error:{0}", ex);
     }
 }
Example #2
0
 private void DoRefreshGameServer(object state)
 {
     try
     {
         GameServerListManager.Initialize(s =>
         {
             string key = GetKey(s.GameID, s.ID);
             TraceLog.ReleaseWrite("Reflesh server:{0} setting.", key);
             GameServerConnection value;
             if (serversPool.TryRemove(key, out value))
             {
                 value.Stop();
             }
         });
     }
     catch (Exception)
     {
     }
 }
Example #3
0
 static void Main(string[] args)
 {
     try
     {
         var dict = new CacheList <int>();
         dict.Add(1);
         string js   = dict.ToJson();
         var    temp = js.ParseJson <CacheList <int> >();
         if (temp == null)
         {
         }
         GameServerListManager.Initialize();
         var server = new GameProxy();
         Console.WriteLine("Press Enter to exit...");
         Console.ReadLine();
     }
     catch (Exception ex)
     {
         TraceLog.WriteError("Main error:{0}", ex);
     }
 }