Beispiel #1
0
        void IPCS.createReplica(string pid, string pcs_url, string cli_srv_url, int msec_per_round, int num_players, int cli, string path)
        {
            string args = cli_srv_url + " " + msec_per_round + " " + num_players + " " + cli + " " + path;

            string exe_path;

            exe_path = Replica.exe_path();
            ProcessStartInfo info = new ProcessStartInfo(exe_path, args);

            info.CreateNoWindow = false;

            Process.Start(info);
        }
Beispiel #2
0
        static public void cmdGlobalStatus(int src)
        {
            printPM("Global Status", src);

            Replica r = new Replica();

            int    s        = 1;
            int    c        = 1;
            string active   = "";
            string inactive = "";

            foreach (var s_url in activeServer)
            {
                if (r.CheckServer(s_url) == 1)
                {
                    active += " S" + s;
                }
                else
                {
                    inactive += " S" + s;
                }
                s += 1;
            }
            foreach (var c_url in activeClient)
            {
                if (r.CheckClient(c_url) == 1)
                {
                    active += " C" + c;
                }
                else
                {
                    inactive += " C" + c;
                }
                c += 1;
            }

            printPM("Everything okay with: " + active, src);
            printPM("Might be down: " + inactive, src);
        }