Beispiel #1
0
 private void CheckForAbnormalDC(ClientManager mngr)
 {
     try
     {
         if (this.RemoveClientManager(mngr.IP))
             this.UpdateConsole("Disconnected.", mngr.IP, mngr.Port);
     }
     catch (Exception ex)
     {
         SendStatus(ex.Message);
     }
 }
Beispiel #2
0
 // accepted socket
 private void CreateNewClientManager(Socket socket)
 {
     try
     {
         ClientManager vsClientManager = new ClientManager(socket);
         vsClientManager.CommandReceived += new CommandReceivedEventHandler(CommandReceived);
         vsClientManager.Disconnected += new DisconnectedEventHandler(ClientDisconnected);
         this.CheckForAbnormalDC(vsClientManager);
         this.vsClients.Add(vsClientManager);
         this.UpdateConsole("Connected.", vsClientManager.IP, vsClientManager.Port);
     }
     catch (Exception ex)
     {
         SendStatus(ex.Message);
     }
 }