feat: add protocol constants, ServerInfo, ClientOptions, and NatsOptions

This commit is contained in:
Joseph Doherty
2026-02-22 20:00:13 -05:00
parent 270ab27ce3
commit 9e36b7c0fc
2 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
namespace NATS.Server;
public sealed class NatsOptions
{
public string Host { get; set; } = "0.0.0.0";
public int Port { get; set; } = 4222;
public string? ServerName { get; set; }
public int MaxPayload { get; set; } = 1024 * 1024; // 1MB
public int MaxControlLine { get; set; } = 4096;
public int MaxConnections { get; set; } = 65536;
public TimeSpan PingInterval { get; set; } = TimeSpan.FromMinutes(2);
public int MaxPingsOut { get; set; } = 2;
}