示例#1
0
        static void Main(string[] args)
        {
            string host = "127.0.0.1";

            if (args != null && args.Length > 0)
            {
                host = args[0];
            }
            string dbHost = "192.168.2.19";

            if (args != null && args.Length > 1)
            {
                dbHost = args[1];
            }

            ConnectionString = $"Server={dbHost};Database=hello_world;User Id=benchmarkdbuser;Password=benchmarkdbpass;Maximum Pool Size=256;NoResetOnClose=true;Enlist=false;Max Auto Prepare=3";
            mXRPCServer      = new BeetleX.XRPC.XRPCServer();
            mXRPCServer.ServerOptions.LogLevel           = BeetleX.EventArgs.LogType.Error;
            mXRPCServer.ServerOptions.DefaultListen.Host = host;
            mXRPCServer.ServerOptions.DefaultListen.Port = 50052;
            mXRPCServer.Register(typeof(Program).Assembly);
            mXRPCServer.Open();
            mXRPCServer.Log(BeetleX.EventArgs.LogType.Info, $"Server Host:{host}| DB Host:{dbHost}");
            Console.Read();
        }
示例#2
0
 static void Main(string[] args)
 {
     mXRPCServer = new BeetleX.XRPC.XRPCServer();
     mXRPCServer.ServerOptions.LogLevel           = BeetleX.EventArgs.LogType.Error;
     mXRPCServer.ServerOptions.DefaultListen.Port = 50052;
     mXRPCServer.Register(typeof(Program).Assembly);
     mXRPCServer.Open();
     Console.Read();
 }
示例#3
0
        static void Main(string[] args)
        {
            string host = "127.0.0.1";

            if (args != null && args.Length > 0)
            {
                host = args[0];
            }
            mXRPCServer = new BeetleX.XRPC.XRPCServer();
            mXRPCServer.ServerOptions.LogLevel           = BeetleX.EventArgs.LogType.Error;
            mXRPCServer.ServerOptions.DefaultListen.Host = host;
            mXRPCServer.ServerOptions.DefaultListen.Port = 50052;
            mXRPCServer.Register(typeof(Program).Assembly);
            mXRPCServer.Open();
            Console.Read();
        }
示例#4
0
文件: Program.cs 项目: zhouzu/XRPC
 public HelloImpl(BeetleX.XRPC.XRPCServer server, User user)
 {
     mServer = server;
     mUser   = user;
 }