Exemple #1
0
 public void processCommand(string line)
 {
     string[] linesplit = line.Split(null);
     if (linesplit[0].Equals("skip"))
     {
         return;
     }
     else if (linesplit[0].Equals("GlobalStatus")) //globalstatus on client!!! improve globalstatus on server
     {
         globalStatus();
     }
     else if (linesplit[0].Equals("Crash")) //CRASH PID
     {
         if (serversUrl.Contains(mapa[linesplit[1]]))
         {
             ServerInterface s = (ServerInterface)Activator.GetObject(
                 typeof(ServerInterface),
                 mapa[linesplit[1]]);
             s.crash();
             serversUrl.Remove(mapa[linesplit[1]]);
             mapa.Remove(linesplit[1]);
         }
         else if (clientsUrl.Contains(mapa[linesplit[1]]))
         {
             ClientInterface c = (ClientInterface)Activator.GetObject(
                 typeof(ClientInterface),
                 mapa[linesplit[1]]);
             c.crash();
             clientsUrl.Remove(mapa[linesplit[1]]);
             mapa.Remove(linesplit[1]);
         }
     }
     else if (linesplit[0].Equals("LocalState")) /*todo*/ } {