28 lines
1.2 KiB
C#
28 lines
1.2 KiB
C#
using System.Security.Cryptography.X509Certificates;
|
|
|
|
namespace EonaCat.Connections.Models
|
|
{
|
|
// Configuration class
|
|
public class Configuration
|
|
{
|
|
public bool EnableAutoReconnect { get; set; } = true;
|
|
public int ReconnectDelayMs { get; set; } = 5000;
|
|
public int MaxReconnectAttempts { get; set; } = 0; // 0 means unlimited attempts
|
|
|
|
public ProtocolType Protocol { get; set; } = ProtocolType.TCP;
|
|
public int Port { get; set; } = 8080;
|
|
public string Host { get; set; } = "127.0.0.1";
|
|
public bool UseSsl { get; set; } = false;
|
|
public X509Certificate2 ServerCertificate { get; set; }
|
|
public bool UseAesEncryption { get; set; } = false;
|
|
public int BufferSize { get; set; } = 8192;
|
|
public int MaxConnections { get; set; } = 100000;
|
|
public TimeSpan ConnectionTimeout { get; set; } = TimeSpan.FromSeconds(30);
|
|
public bool EnableKeepAlive { get; set; } = true;
|
|
public bool EnableNagle { get; set; } = false;
|
|
|
|
// For testing purposes, allow self-signed certificates
|
|
public bool IsSelfSignedEnabled { get; set; } = true;
|
|
public string AesPassword { get; set; }
|
|
}
|
|
} |