namespace SOR.Networking.WebSocket;
///
/// Configuration options for the WebSocket transport.
/// Bound from the "WebSocket" section of appsettings.json via IOptions{WebSocketTransportOptions}.
///
/// appsettings.json example:
/// {
/// "WebSocket": {
/// "Path": "/ws",
/// "PingIntervalMs": 30000,
/// "MaxMessageSizeBytes": 65536,
/// "AuthTimeoutMs": 10000
/// }
/// }
///
public sealed class WebSocketTransportOptions
{
///
/// The URL path the Gateway listens for WebSocket upgrade requests.
/// All other paths are passed through to the normal ASP.NET Core routing pipeline.
/// Default: "/ws"
///
public string Path { get; set; } = "/ws";
///
/// How often to send a WebSocket ping frame to detect stale connections.
/// RFC 6455 compliant clients respond automatically with a pong.
/// If no pong is received within this interval the connection is considered dead.
/// Default: 30 seconds (30,000 ms)
///
public int PingIntervalMs { get; set; } = 30_000;
///
/// Maximum allowed size of a single WebSocket message in bytes.
/// Multi-frame messages are assembled up to this limit.
/// Messages exceeding this cause the connection to be closed with code 1009 (too large).
/// Default: 64 KB (65,536 bytes) — sufficient for all current game message types.
///
public int MaxMessageSizeBytes { get; set; } = 65_536;
}