Пример #1
0
    //-------------------------------------------------------------------------
    static void Main(string[] args)
    {
        GrainClient.Initialize("BaseClientConfiguration.xml");

        Console.Title = "FishingBase";

        ProgramConfig config = new ProgramConfig();

        config.load("./FishingBase.exe.config");

        EsEngineSettings settings;

        settings.NodeType            = 2;
        settings.NodeTypeString      = "Base";
        settings.ListenIp            = config.ListenIp;
        settings.ListenPort          = config.ListenPort;
        settings.RootEntityType      = "EtRoot";
        settings.EnableCoSupersocket = true;
        settings.Log4NetConfigPath   = "../../../Media/Fishing/Config/FishingBase.log4net.config";

        try
        {
            EsEngine e = new EsEngine(ref settings, new EsEngineListener());
            e.run();
        }
        catch (System.Exception ex)
        {
            EbLog.Note(ex.ToString());
        }

        GrainClient.Uninitialize();
    }
Пример #2
0
    //-------------------------------------------------------------------------
    static void Main(string[] args)
    {
        Console.Title = "FishingCell";

        EsEngineSettings settings;

        settings.NodeType            = 3;
        settings.NodeTypeString      = "Cell";
        settings.ListenIp            = "";
        settings.ListenPort          = 0;
        settings.RootEntityType      = "EtRoot";
        settings.EnableCoSupersocket = false;
        settings.Log4NetConfigPath   = "../../../Media/Fishing/Config/FishingCell.log4net.config";

        EsEngine e = new EsEngine(ref settings, new EsEngineListener());

        var silo_host = new WindowsServerHost();

        int exit_code;

        try
        {
            if (!silo_host.ParseArguments(args))
            {
                silo_host.PrintUsage();
                exit_code = -1;
            }
            else
            {
                silo_host.Init();
                exit_code = silo_host.Run();
            }
        }
        catch (Exception ex)
        {
            EbLog.Error(string.Format("halting due to error - {0}", ex.ToString()));
            exit_code = 1;
        }
        finally
        {
            silo_host.Dispose();
            e.close();
        }

        Environment.Exit(exit_code);
    }
Пример #3
0
    //-------------------------------------------------------------------------
    static void Main(string[] args)
    {
        Console.Title = "EsTest";

        EsEngineSettings settings;

        settings.NodeType            = 2;
        settings.NodeTypeString      = "EsTest";
        settings.ListenIp            = "127.0.0.1";
        settings.ListenPort          = 5882;
        settings.RootEntityType      = "EtNode";
        settings.EnableCoSupersocket = false;
        settings.Log4NetConfigPath   = "../../../Media/EsTest/EsTest.log4net.config";

        EsEngine e = new EsEngine(ref settings, new EsEngineListener());

        e.run();
    }