广播聊天

This commit is contained in:
bob
2025-08-07 17:51:25 +08:00
parent 70bfe43a80
commit e1a4db89ae
19 changed files with 347 additions and 21 deletions

View File

@@ -52,4 +52,19 @@ public static class GateUnitManageComponentSystem
unit.Dispose();
}
}
/// <summary>
/// 回话迭代器
/// </summary>
/// <param name="self"></param>
/// <returns></returns>
public static IEnumerable<Session> ForEachUnitSession(this GateUnitManageComponent self)
{
foreach (var (_, gateUnit) in self.Units)
{
Session gateSession = gateUnit.Session;
if (gateSession == null) continue;
yield return gateSession;
}
}
}

View File

@@ -28,8 +28,8 @@ public static class GateJWTComponentSystem
ValidateIssuer = true, // 验证发行者
ValidateAudience = true, // 验证受众
ValidateIssuerSigningKey = true, // 验证签名密钥
ValidIssuer = "Fantasy", // 有效的发行者
ValidAudience = "Fantasy", // 有效的受众
ValidIssuer = "NoBug", // 有效的发行者
ValidAudience = "NoBug", // 有效的受众
IssuerSigningKey = new RsaSecurityKey(rsa) // RSA公钥作为签名密钥
};
}