public static bool Load(fmDataTable table, AttacherConfig chatConfig) { if (null == chatConfig) { return(false); } if (true == string.IsNullOrEmpty(chatConfig.m_strIP)) { return(false); } if (0 == chatConfig.m_nPort) { return(false); } ChatSvrIp = chatConfig.m_strIP; ChatSvrPort = chatConfig.m_nPort; //Dictionary<int, fmData> dics = table.Find(eFmDataType.GameConst); //if (null == dics) // return false; //foreach (var node in dics) //{ // fmDataGameConst data = node.Value as fmDataGameConst; // if (false == Add(data)) // return false; //} return(true); }
public void OnAttach(int seq, AttacherConfig toConfig, ListenerConfig fromConfig) { if (null == toConfig || null == fromConfig) { Logger.Error("OnAttach: config == null"); return; } m_nSequence = seq; m_toConfig = toConfig; m_fromConfig = fromConfig; Connect(m_toConfig.m_strIP, m_toConfig.m_nPort); m_eToServerType = eServerType.Center; }