Files
SVSimServer/SVSim.BattleNode/Sessions/Dispatch/Handlers/ForwardWhenBothReadyHandler.cs

14 lines
399 B
C#

using SVSim.BattleNode.Protocol;
namespace SVSim.BattleNode.Sessions.Dispatch.Handlers;
internal sealed class ForwardWhenBothReadyHandler : IFrameHandler
{
public IReadOnlyList<DispatchRoute> Handle(FrameDispatchContext ctx)
{
if (ctx.BothAfterReady())
return new[] { new DispatchRoute(ctx.Other, ctx.Env, false) };
return Array.Empty<DispatchRoute>();
}
}