Beispiel #1
0
        /// <summary>
        /// 获取所有的用户
        /// </summary>
        public void GetAllUserSession()
        {
            GetAllSession tmp = new GetAllSession()
            {
                UserIds   = new List <long>(),
                IsSuccess = false
            };

            SendToServer(BufferFormat.FormatFCA(tmp));
        }
Beispiel #2
0
        /// <summary>
        ///  检查失效的连接
        /// </summary>
        /// <param name="allsession"></param>
        private void CheckDroupConnect(GetAllSession allsession)
        {
            var tmpRemoveList = new List <long>();

            foreach (var key in ConnUserList.Keys)
            {
                if (!allsession.UserIds.Contains(key))
                {
                    tmpRemoveList.Add(key);
                }
            }

            foreach (var removekey in tmpRemoveList)
            {
                DropConnUser(removekey);
            }
        }