示例#1
0
        private void CheckTimeout()
        {
            float curTime = SGFTime.GetTimeSinceStartup();

            if (curTime - m_lastCheckTimeoutStamp >= 5)
            {
                m_lastCheckTimeoutStamp = curTime;

                var list = m_listRspListener.ToArray();
                for (int i = 0; i < list.Length; i++)
                {
                    var   helper = list[i];
                    float dt     = curTime - helper.timestamp;
                    if (dt >= helper.timeout)
                    {
                        m_listRspListener.Remove(helper.index);
                        if (helper.onErr != null)
                        {
                            helper.onErr.DynamicInvoke(NetErrorCode.Timeout);
                        }

                        Debuger.LogWarning("cmd:{0} Is Timeout!", helper.cmd);
                    }
                }
            }
        }
        public void Dump()
        {
            StringBuilder sb = new StringBuilder();

            UserData[] list = m_mapUserData.ToArray();
            for (int i = 0; i < list.Length; i++)
            {
                sb.AppendLine("\t" + list[i].ToString());
            }

            Debuger.LogWarning("\nUser ({0}):\n{1}", m_mapUserData.Count, sb);
        }
示例#3
0
 public static ServerModuleInfo[] GetServerModuleInfoList()
 {
     return(MapServerModuleInfo.ToArray());
 }