public void StopServer()
        {
            foreach (var clientInfo in Clients)
            {
                clientInfo.Value.ClientTCP.GetStream().Close();
                clientInfo.Value.ClientTCP.Close();
            }

            listner.Stop();
            sendner.Stop();
            isWorking = false;

            DebugAdapter.Log("Server is stoped");
        }
Example #2
0
 public void AbortClient()
 {
     try
     {
         info.ClientTCP.Close();
         stream.Close();
         sendner.Stop();
     }
     catch
     { }
     finally
     {
         isWorking = false;
         DebugAdapter.Log("Client disconnected");
     }
 }