예제 #1
0
 public static void ReadUpdate()
 {
     while (true)
     {
         Thread.Sleep(5000);
         if (GatewayServer.getClientCount() == 0)
         {
             CollectGarbage();
             break;
         }
         //Thread.Sleep(cfgGateway.intGarbageCollectTime);
     }
 }
예제 #2
0
 private static void Start()
 {
     try
     {
         //GatewayServer s_Tcp = new GatewayServer(cfgGateway.strIP, cfgGateway.strPort);
         GatewayServer s_Tcp = new GatewayServer("192.168.1.2", "15550");
         ConsoleUpdate();
         ReadUpdate();
     }
     catch (Exception ex)
     {
         Logger.ExceptionToLog(ex, "[Program::Start()] -> TcpServer error.");
     }
 }
예제 #3
0
 public static void ConsoleUpdate()
 {
     while (true)
     {
         Console.Title = Assembly.GetExecutingAssembly().GetName().Name + "[Clients:" + GatewayServer.getClientCount() + "]";
         Thread.Sleep(10);
         //Thread.Sleep(cfgGateway.intGarbageCollectTime);
     }
 }