feat(battle-node): WaitingRoom for PvP WS rendezvous
Per-BattleId slot keyed dict. Pair returns the first arriver to the second; ParkAsync awaits a TCS and returns the second arriver. Timeout defaults to BattleNodeOptions.WaitingRoomTimeout (60s); evict on timeout keeps the dict clean. Singleton in DI; consumed by the handler in the next task.
This commit is contained in:
@@ -8,4 +8,11 @@ namespace SVSim.BattleNode.Bridge;
|
||||
public sealed class BattleNodeOptions
|
||||
{
|
||||
public string NodeServerUrl { get; set; } = "localhost:5148/socket.io/";
|
||||
|
||||
/// <summary>
|
||||
/// How long the first arriver's WS waits for a partner before disconnecting.
|
||||
/// Matches the architecture spec's 60s default; override (typically lower)
|
||||
/// in tests via the factory.
|
||||
/// </summary>
|
||||
public TimeSpan WaitingRoomTimeout { get; set; } = TimeSpan.FromSeconds(60);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user