예제 #1
0
        public string PublicServerRunParamConvert(string path, TPublicLogicServerCfgData cfgData)
        {
            StringBuilder paramArgs = new StringBuilder();

            paramArgs.Append(path).Append(" ");
            paramArgs.Append(cfgData.gameID).Append(" ");
            paramArgs.Append(cfgData.serverID).Append(" ");
            paramArgs.Append(cfgData.lanIPAddr).Append(" ");
            paramArgs.Append(cfgData.inPort).Append(" ");
            paramArgs.Append(string.Format("{0},{1}", cfgData.centerServer.key, cfgData.centerServer.value)).Append(" ");
            paramArgs.Append(string.Format("{0},{1}", "127.0.0.1", SvrCommCfg.Instance.ServerInfo.m_Port));

            return(paramArgs.ToString());
        }
예제 #2
0
        public TPublicLogicServerCfgData PublicServerRunParamConvert(string[] runParams, out string moniteorSvrAddr, out int moniteorSvrPort)
        {
            moniteorSvrAddr = "";
            moniteorSvrPort = 0;
            TPublicLogicServerCfgData cfgData = new TPublicLogicServerCfgData();

            cfgData.gameID             = Convert.ToInt32(runParams[1]);
            cfgData.serverID           = Convert.ToInt32(runParams[2]);
            cfgData.lanIPAddr          = runParams[3];
            cfgData.inPort             = Convert.ToInt32(runParams[4]);
            cfgData.centerServer       = new TStrKeyValue();
            cfgData.centerServer.key   = HTBaseFunc.DepartStr(runParams[5], ",", 0);
            cfgData.centerServer.value = HTBaseFunc.DepartStr(runParams[5], ",", 1);
            moniteorSvrAddr            = HTBaseFunc.DepartStr(runParams[6], ",", 0);
            moniteorSvrPort            = Convert.ToInt32(HTBaseFunc.DepartStr(runParams[6], ",", 1));

            return(cfgData);
        }