コード例 #1
0
ファイル: Main.cs プロジェクト: VisionSim/Vision-Sim-NXG
        // private UUID m_lastCreatedUser = UUID.Random();

        public static void Main(string[] args)
        {
            XmlConfigurator.Configure();

            m_log.Info("[SERVER]: Launching MessagingServer...");

            OpenMessage_Main messageserver = new OpenMessage_Main();

            messageserver.Startup();
            messageserver.Work();
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            ServicePointManager.DefaultConnectionLimit = 12;

            XmlConfigurator.Configure();

            m_log.Info("[SERVER]: Launching MessagingServer...");

            OpenMessage_Main messageserver = new OpenMessage_Main();

            messageserver.Startup();
            messageserver.Work();
        }
コード例 #3
0
ファイル: Main.cs プロジェクト: NoahStarfinder/My-Halcyon
        public static void Main(string[] args)
        {
            // Please note that if you are changing something in this function you should check to see if you need to change the other server's Main functions as well.

            // Under any circumstance other than an explicit exit the exit code should be 1.
            Environment.ExitCode = 1;

            ServicePointManager.DefaultConnectionLimit = 12;

            // Add the arguments supplied when running the application to the configuration
            var configSource = new ArgvConfigSource(args);

            configSource.Alias.AddAlias("On", true);
            configSource.Alias.AddAlias("Off", false);
            configSource.Alias.AddAlias("True", true);
            configSource.Alias.AddAlias("False", false);
            configSource.Alias.AddAlias("Yes", true);
            configSource.Alias.AddAlias("No", false);

            configSource.AddSwitch("Startup", "background");
            configSource.AddSwitch("Startup", "pidfile");

            m_log.Info("[SERVER]: Launching MessagingServer...");

            var pidFile = new PIDFileManager(configSource.Configs["Startup"].GetString("pidfile", string.Empty));

            XmlConfigurator.Configure();

            OpenMessage_Main messageserver = new OpenMessage_Main();

            pidFile.SetStatus(PIDFileManager.Status.Starting);
            messageserver.Startup();

            pidFile.SetStatus(PIDFileManager.Status.Running);
            messageserver.Work(configSource.Configs["Startup"].GetBoolean("background", false));
        }