using System.Net; namespace StellaOps.Router.Transport.Tcp; /// /// Configuration options for TCP transport. /// public sealed class TcpTransportOptions { /// /// Gets or sets the address to bind to. /// Default: IPAddress.Any (0.0.0.0). /// public IPAddress BindAddress { get; set; } = IPAddress.Any; /// /// Gets or sets the port to listen on. /// Default: 5100. /// public int Port { get; set; } = 5100; /// /// Gets or sets the receive buffer size. /// Default: 64 KB. /// public int ReceiveBufferSize { get; set; } = 64 * 1024; /// /// Gets or sets the send buffer size. /// Default: 64 KB. /// public int SendBufferSize { get; set; } = 64 * 1024; /// /// Gets or sets the keep-alive interval. /// Default: 30 seconds. /// public TimeSpan KeepAliveInterval { get; set; } = TimeSpan.FromSeconds(30); /// /// Gets or sets the connection timeout. /// Default: 10 seconds. /// public TimeSpan ConnectTimeout { get; set; } = TimeSpan.FromSeconds(10); /// /// Gets or sets the maximum number of reconnection attempts. /// Default: 10. /// public int MaxReconnectAttempts { get; set; } = 10; /// /// Gets or sets the maximum reconnection backoff. /// Default: 1 minute. /// public TimeSpan MaxReconnectBackoff { get; set; } = TimeSpan.FromMinutes(1); /// /// Gets or sets the maximum frame size in bytes. /// Default: 16 MB. /// public int MaxFrameSize { get; set; } = 16 * 1024 * 1024; /// /// Gets or sets the host for client connections. /// public string? Host { get; set; } }