Changing packet dispatch, packets dying on gateway and not being relayed

This commit is contained in:
dingo
2026-02-28 15:10:49 -05:00
parent fd8fe950f8
commit 285d67374e
7 changed files with 427 additions and 67 deletions
@@ -0,0 +1,28 @@
namespace SOR.Shared.Networking;
using System.Text.Json;
/// <summary>
/// NATS request payload used when the Gateway relays a client message to a worker.
/// </summary>
public sealed record RemoteDispatchRequest(
string Type,
int Seq,
byte[] Payload,
string UserId,
string DisplayName,
string SessionToken
);
/// <summary>
/// NATS response payload returned by a worker after handling a relayed client message.
/// </summary>
public sealed record RemoteDispatchResponse(
bool Handled,
bool HasResponse,
string? ResponseType,
int ResponseRef,
JsonElement? ResponsePayload,
string? ErrorCode,
string? ErrorMessage
);