Beispiel #1
0
 public void Stop()
 {
     lock (logmon)
     {
         stop = true;
         try
         {
             server.StopServer();
         }
         finally
         {
             server = null;
         }
     }
 }
Beispiel #2
0
 public void Start()
 {
     if (server == null)
     {
         server = new WatchKeeper(this);
         server.BeginListen();
     }
     if (monThread == null)
     {
         lock (logmon)
         {
             stop = false;
             var mt = new Thread(LogMonitorThread);
             mt.IsBackground = true;
             mt.Start();
             monThread = mt;
         }
     }
 }