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:
gamer147
2026-06-01 21:55:11 -04:00
parent db054205b3
commit 2789dc08cb
5 changed files with 171 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ public static class BattleNodeExtensions
services.AddSingleton(options);
services.AddSingleton<IBattleSessionStore, InMemoryBattleSessionStore>();
services.AddSingleton<IMatchingBridge, MatchingBridge>();
services.AddSingleton<IWaitingRoom, WaitingRoom>();
services.AddSingleton<BattleNodeWebSocketHandler>();
return services;
}