Пример #1
0
        public void stopServer()
        {
            foreach (KeyValuePair <string, TcpClient> entry in clientSockets)
            {
                server.endConnection(entry.Value);
            }

            server.OnNewClientRequest  -= reqListener;
            server.OnNewMessageRecived -= msgListener;
            reqListener = null;
            msgListener = null;
            server.stopServer();
            server = null;
        }
Пример #2
0
 public void stopManager()
 {
     try
     {
         server.OnNewClientRequest -= clientHandler;
         clientHandler              = null;
         server.stopServer();
         //server = null;
     }
     catch
     {
         GC.Collect();
         logs.addLogFromOutside("Problems with disconnecting", true, Constants.LOG_ERROR);
     }
 }
Пример #3
0
        public void stopManager()
        {
            try
            {
                foreach (TcpClient client in server.clientSocket)
                {
                    server.endConnection(client);
                }

                server.OnNewClientRequest -= clientHandler;
                clientHandler              = null;
                server.stopServer();
                server = null;
            }
            catch
            {
                logs.addLogFromOutside("Problems with disconnecting", true, Constants.LOG_ERROR);
            }
        }