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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user