/// <summary> /// 业务逻辑处理 /// </summary> /// <returns>false:中断后面的方式执行并返回Error</returns> public override bool TakeAction() { if (ServerSsMgr.Get(Current.SessionId) != null) { ServerHelper.OnCloseCSBefore(Current); } return(true); }
////////////////////////////////////////////////////////////////////////////////////////// public static GameSession GetConnectSession(string proxId) { var proxIdData = GetProxIdData(proxId); if (proxIdData == null) { return(null); } return(ServerSsMgr.Get(proxIdData.serverSid)); }
/// <summary> /// 是否存在社交服 /// </summary> static public bool IsExistSocialS() { var socialSs = ServerSsMgr.Get((int)GlobalDefine.ServerIdType.SocialId); if (socialSs != null) { if (socialSs.IsHeartbeatTimeout) { ServerSsMgr.DelSession(socialSs); return(false); } else { return(true); } } return(false); }
/// <summary> /// 是否存在连接服 /// </summary> static public bool IsExistCS(int _serverId) { var connectServer = sConnectServerSet.FindKey(_serverId); if (connectServer != null) { var connectSs = ServerSsMgr.Get(connectServer.CSSid); if (connectSs != null) { if (connectSs.IsHeartbeatTimeout) { ServerSsMgr.DelSession(connectSs); sConnectServerSet.Delete(connectServer); connectServer = null; } } } return(connectServer != null); }
/// <summary> /// 是否存在房间服 /// </summary> static public bool IsExistRS(int _serverId) { var roomServer = sRoomServerSet.FindKey(_serverId); if (roomServer != null) { var roomSs = ServerSsMgr.Get(roomServer.RSSid); if (roomSs != null) { if (roomSs.IsHeartbeatTimeout) { ServerSsMgr.DelSession(roomSs); sRoomServerSet.Delete(roomServer); roomServer = null; } } } return(roomServer != null); }