Example #1
0
 private void testServerInstance_MouseClick(object sender, MouseEventArgs e)
 {
     if (canStart)
     {
         ServerInstance testServer = new ServerInstance("127.0.0.1", "9999", "12345", "D:\\Troy-Heinicke\\PackagedProjects\\KreavianShooter\\Windows\\WindowsNoEditor\\KreavianShooter\\Binaries\\Win64");
         bool           started    = testServer.StartServer(false);
         Console.WriteLine("Server Started: {0} ID: {1}", started, testServer.GetProcessIdOfServer().ToString());
         testServerPID = testServer.GetProcessIdOfServer();
         testServerInstancebtn.Text    = "Running...";
         testServerInstancebtn.Enabled = false;
         canStart = false;
     }
 }
Example #2
0
        private static string InitiateServer(string matchMakingID)
        {
            //Port is avaible, registers the server.
            string foundPort = FindAvaiblePort();
            string address   = GetPublicIPAddress();

            registerServer(address, foundPort);
            registerMMServer(matchMakingID, foundPort);
            string conn = string.Concat(address, ":", foundPort);
            //Start The Server Instance
            ServerInstance serverInstance = new ServerInstance(address, foundPort, matchMakingID, "D:\\Troy-Heinicke\\PackagedProjects\\KreavianShooter\\Windows\\WindowsNoEditor\\KreavianShooter\\Binaries\\Win64");

            serverInstance.StartServer(true);

            return(conn);
        }