Example #1
0
        public void Start()
        {
            Log.FileLog.Instance.Deleget_WriteLog = DataServerFrm.Inst.PushLog;

//             if (!System.IO.Directory.Exists(ServerCommon.IServer.Instance.ExePath + "srvcfg"))
//                 System.IO.Directory.CreateDirectory(ServerCommon.IServer.Instance.ExePath + "srvcfg");
//             ServerCommon.IDataServerParameter parameter = new ServerCommon.IDataServerParameter();
//             string fullPathname = "Bin/srvcfg/DataServer.datasrv";
//             if (false == ServerFrame.Config.IConfigurator.FillProperty(parameter, fullPathname))
//             {
//                 //System.Windows.Forms.MessageBox.Show("请检查服务器配置文件");
//                 ServerFrame.Config.IConfigurator.SaveProperty(parameter, "DataServer", fullPathname);
//             }

            ServerCommon.IDataServerParameter parameter = ServerCommon.ServerConfig.Instance.DataParam;

            ServerCommon.IDataServer.Instance = mServer;

            ServerFrame.DB.DBConnect.ConnectIP = parameter.DateBaseIP;
            mServer.Start(parameter);

            mRoot             = new ServerCommon.RPCRoot();
            mRoot.mDataServer = mServer;
            RPC.RPCNetworkMgr.Instance.mRootObject = mRoot;
        }
Example #2
0
        public void Start()
        {
            Log.FileLog.Instance.Deleget_WriteLog = RegisterServerFrm.Inst.PushLog;

//             if (!System.IO.Directory.Exists(ServerCommon.IServer.Instance.ExePath + "srvcfg"))
//                 System.IO.Directory.CreateDirectory(ServerCommon.IServer.Instance.ExePath + "srvcfg");
//            ServerCommon.IRegisterServerParameter parameter = new ServerCommon.IRegisterServerParameter();
//             string fullPathname = "Bin/srvcfg/RegServer.regsrv";
//             if (false == ServerFrame.Config.IConfigurator.FillProperty(parameter, fullPathname))
//             {
//                 //System.Windows.Forms.MessageBox.Show("请检查服务器配置文件");
//                 ServerFrame.Config.IConfigurator.SaveProperty(parameter, "RegServer", fullPathname);
//             }
            ServerCommon.IRegisterServerParameter parameter = ServerCommon.ServerConfig.Instance.RegParam;
            mServer.Start(parameter);
            mRoot            = new ServerCommon.RPCRoot();
            mRoot.mRegServer = mServer;
            RPC.RPCNetworkMgr.Instance.mRootObject = mRoot;

            SocketPolicyServer server = new SocketPolicyServer(SocketPolicyServer.AllPolicy);
            int result = server.Start();

            if (result != 0)
            {
                Log.Log.Server.Info("unity plicy Server Start failed!");
            }
        }
Example #3
0
        public void Start()
        {
            Log.FileLog.Instance.Deleget_WriteLog = PlanesServerFrm.Inst.PushLog;

//             if (!System.IO.Directory.Exists(ServerCommon.IServer.Instance.ExePath + "srvcfg"))
//                 System.IO.Directory.CreateDirectory(ServerCommon.IServer.Instance.ExePath + "srvcfg");
//
//             ServerCommon.IPlanesServerParameter parameter = new ServerCommon.IPlanesServerParameter();
//             string fullPathname = "Bin/srvcfg/PlanesServer.planesrv";
//             if (false == ServerFrame.Config.IConfigurator.FillProperty(parameter, fullPathname))
//             {
//                 //System.Windows.Forms.MessageBox.Show("请检查服务器配置文件");
//                 ServerFrame.Config.IConfigurator.SaveProperty(parameter, "PlanesServer", fullPathname);
//             }
            ServerCommon.IPlanesServerParameter parameter = ServerCommon.ServerConfig.Instance.PlaneParam;

            try
            {
                mServer.Start(parameter);
            }
            catch (System.Exception ex)
            {
                Log.Log.Common.Print(ex.ToString());
                Log.Log.Common.Print(ex.StackTrace.ToString());
                Log.FileLog.Instance.Flush();
            }

            mRoot = new ServerCommon.RPCRoot();
            mRoot.mPlanesServer = mServer;
            RPC.RPCNetworkMgr.Instance.mRootObject = mRoot;
        }
Example #4
0
        public void Start()
        {
            Log.FileLog.Instance.Deleget_WriteLog = ComServerFrm.Inst.PushLog;
//             if (!System.IO.Directory.Exists(ServerCommon.IServer.Instance.ExePath + "srvcfg"))
//                 System.IO.Directory.CreateDirectory(ServerCommon.IServer.Instance.ExePath + "srvcfg");
//
//             ServerCommon.IComServerParameter parameter = new ServerCommon.IComServerParameter();
//             string fullPathname = "Bin/srvcfg/ComServer.comsrv";
//             if (false == ServerFrame.Config.IConfigurator.FillProperty(parameter, fullPathname))
//             {
//                 ServerFrame.Config.IConfigurator.SaveProperty(parameter, "ComServer", fullPathname);
//             }
            ServerCommon.IComServerParameter parameter = ServerCommon.ServerConfig.Instance.ComParam;
            ServerFrame.DB.DBConnect.ConnectIP = parameter.DateBaseIP;

            try
            {
                mServer.Start(parameter);
            }
            catch (System.Exception ex)
            {
                Log.Log.Common.Print(ex.ToString());
                Log.Log.Common.Print(ex.StackTrace.ToString());
                Log.FileLog.Instance.Flush();
            }
            mRoot            = new ServerCommon.RPCRoot();
            mRoot.mComServer = mServer;
            RPC.RPCNetworkMgr.Instance.mRootObject = mRoot;
        }