Esempio n. 1
0
        public void KeepOneSession(string openId)
        {
            var existSession = GameServer.GetSessions(a => a.GameAttr.UserOpenId == openId);

            if (existSession.Count() > 0)
            {
                foreach (var session in existSession)
                {
                    if (session.SessionID != this.SessionID)
                    {
                        this.GameAttr = session.GameAttr;
                        session.Close(SuperSocket.SocketBase.CloseReason.InternalError);
                    }
                }
            }
        }