Beispiel #1
0
        static int Main(string[] args)
        {
            Console.Title = "MiniBillingServer by Syinea V1.0";

            Console.WriteLine("Visit: https://facebook.com/syinea");
            Console.WriteLine("for more information and updates");
            Console.WriteLine("");
            Console.WriteLine("Visit: Official Coder ");
            Console.WriteLine("https://github.com/florian0");

            try
            {
                Http.HttpServer server = new Http.HttpServer();

                Model.BindingConfiguration bindcfg = new Model.BindingConfiguration("Settings/config.ini");

                Console.WriteLine("");
                Console.WriteLine("You should set billing server address to this one: ");
                Console.WriteLine("");
                Console.WriteLine("http://" + bindcfg.Address + ":" + bindcfg.Port + @"/");
                Console.WriteLine("");
                Console.WriteLine("Mini Billing Server modified by Syinea");
                Console.WriteLine("");
                Console.WriteLine("-------------------------------------------------------------------");

                server.Prefixes.Add("http://" + bindcfg.Address + ":" + bindcfg.Port + "/");

                server.Handlers.Add(new Handlers.ServerStateHandler());
                server.Handlers.Add(new Handlers.SilkDataCallHandler());

                Model.SilkDB.Instance.Init();

                server.Start();
            }
            catch (FileNotFoundException ex)
            {
                Console.WriteLine("[Exception] {0}", ex.Message);
                Console.WriteLine(CheckConfigIssue());
                Console.Read();
                return(-1);
            }

            Console.Read();

            return(0);
        }
Beispiel #2
0
        static void StartBillingServer()
        {
            Be_Config _Config = Config.cfg;

            Http.HttpServer server = new Http.HttpServer();
            Console.WriteLine("");
            Console.WriteLine("You should set billing server address to this one: ");
            Console.WriteLine("");
            Console.WriteLine("http://" + _Config.Listen_Address + ":" + _Config.Listen_Port + @"/");
            Console.WriteLine("");
            Console.WriteLine("-------------------------------------------------------------------");
            server.Prefixes.Add("http://" + _Config.Listen_Address + ":" + _Config.Listen_Port + "/");
            server.Handlers.Add(new Handlers.ServerStateHandler());
            server.Handlers.Add(new Handlers.SilkDataCallHandler());
            Model.SilkDB.Instance.Init();
            server.Start();
        }