Пример #1
0
 public static void InitStream()
 {
     if (!IsRuning)
     {
         HttpServerManager.ListenPort = (ushort)SettingsManager.Settings.GhostStreamPort;
         sv              = new GhostReplays.GhostReplayServer(SettingsManager.Settings.GhostStreamPort);
         Forwarded       = false;
         StreamingThread = new Thread(new ThreadStart(Listen));
         Start();
     }
 }
Пример #2
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>

        static void Main()
        {
            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);

            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            SettingsManager.Init();
            //  //  [DISABLED] Console.Title = "Ghostblade Replay Server";
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            string[] args = Environment.GetCommandLineArgs();
            if (args.Length == 6)
            {
                string GameId = args[1];
                string Region = args[2];
                string gpath  = args[3];
                string lol    = args[4];
                string rep    = args[5];

                //     ReplayServer server = new ReplayServer(GameId, Region);
                GhostReplayServer sv = new GhostReplayServer(9068, GameId, Region, gpath, lol, rep);
                sv.listen();
            }
            else if (args.Length == 7)
            {
                string GameId = args[1];
                string Region = args[2];
                string gpath  = args[3];
                string lol    = args[4];
                string rep    = args[5];
                string ext    = args[6];

                if (int.TryParse(ext, out port))
                {
                    //     ReplayServer server = new ReplayServer(GameId, Region);


                    GhostReplayServer sv = new GhostReplayServer(port, GameId, Region, gpath, lol, rep);
                    sv.listen();
                }
            }
        }