예제 #1
0
파일: Service.cs 프로젝트: jokerlfm/Ning
        public void Stop()
        {
            this.working = false;

            SocketOperator.FinishSocket(ref this.authClientListener);
            MLogger.RuntimeLogger.Basic("Client listener Stopped.");

            try
            {
                if (clientAcceptingThread != null)
                {
                    clientAcceptingThread.Abort();
                }
            }
            catch (Exception)
            {
            }
            clientAcceptingThread = null;
            MLogger.RuntimeLogger.Basic("Client accepting thread aborted.");
            MLogger.RuntimeLogger.Basic("Authentication server Stopped.");

            try
            {
                if (loggingThread != null)
                {
                    loggingThread.Abort();
                }
            }
            catch (Exception)
            {
            }
            loggingThread = null;
        }
예제 #2
0
 public void StopSession()
 {
     if (this.working)
     {
         this.working = false;
         SocketOperator.FinishSocket(ref clientSocket);
         try
         {
             if (receiveThread != null)
             {
                 receiveThread.Abort();
             }
         }
         catch (Exception)
         {
         }
         receiveThread = null;
         try
         {
             if (sendThread != null)
             {
                 sendThread.Abort();
             }
         }
         catch (Exception)
         {
         }
         sendThread = null;
         try
         {
             if (handleThread != null)
             {
                 handleThread.Abort();
             }
         }
         catch (Exception)
         {
         }
         handleThread = null;
         this.outAPQueue.Clear();
     }
 }