feat(emulated-entrypoint): InProcessPairUp service for TK2 PvP matching
Tiny per-mode FCFS slot. First poller parks; second pairs and triggers bridge.RegisterBattle(p1, p2, Pvp). Match cached for first poller's next poll (consume-on-read). No MMR, no cross-mode, no timeouts -- the proper queue API is a separate spec; this is the smallest thing that lets TK2 PvP work end-to-end.
This commit is contained in:
@@ -13,6 +13,7 @@ using SVSim.Database.Repositories.Viewer;
|
||||
using SVSim.Database.Services;
|
||||
using SVSim.EmulatedEntrypoint.Configuration;
|
||||
using SVSim.EmulatedEntrypoint.Extensions;
|
||||
using SVSim.EmulatedEntrypoint.Matching;
|
||||
using SVSim.EmulatedEntrypoint.Middlewares;
|
||||
using SVSim.EmulatedEntrypoint.Security.SteamSessionAuthentication;
|
||||
using SVSim.EmulatedEntrypoint.Services;
|
||||
@@ -124,6 +125,10 @@ public class Program
|
||||
// BestHTTP's SocketManager parses this as the Socket.IO v2 endpoint URL.
|
||||
opt.NodeServerUrl = "localhost:5148/socket.io/";
|
||||
});
|
||||
// In-process FCFS pair-up for TK2 PvP /do_matching. Singleton: per-mode state is
|
||||
// process-wide. Proper queue API is a separate spec; this is enough to actually
|
||||
// pair two viewers polling the same mode end-to-end.
|
||||
builder.Services.AddSingleton<IMatchingPairUpService, InProcessPairUp>();
|
||||
|
||||
builder.Services.AddTransient<ShadowverseTranslationMiddleware>();
|
||||
builder.Services.AddTransient<SessionidMappingMiddleware>();
|
||||
|
||||
Reference in New Issue
Block a user