Extend configuration.

This commit is contained in:
Christian Kratky
2019-03-11 18:43:39 +01:00
parent cd76f434e3
commit e1799ea6a3
8 changed files with 228 additions and 120 deletions
@@ -27,12 +27,17 @@
/// <summary>
/// Listen Settings
/// </summary>
public ListenModel EndPoint { get; set; } = new ListenModel();
public TcpEndpointModel TcpEndPoint { get; set; } = new TcpEndpointModel();
/// <summary>
/// Encryption Listen Settings
/// </summary>
public ListenModel EndPointEncryption { get; set; } = new ListenModel();
public TcpEndpointModel EncryptedTcpEndPoint { get; set; } = new TcpEndpointModel();
/// <summary>
/// Settings for the Web Socket endpoint.
/// </summary>
public WebSocketEndpointModel WebSocketEndpoint { get; set; } = new WebSocketEndpointModel();
/// <summary>
/// Set limit for max pending messages per client
@@ -6,12 +6,12 @@ namespace MQTTnet.Server.Configuration
/// <summary>
/// Listen Entry Settings Model
/// </summary>
public class ListenModel
public class TcpEndpointModel
{
/// <summary>
/// Constructor
/// </summary>
public ListenModel()
public TcpEndpointModel()
{
}
@@ -0,0 +1,18 @@
using System.Collections.Generic;
namespace MQTTnet.Server.Configuration
{
public class WebSocketEndpointModel
{
public bool Enabled { get; set; } = true;
public string Path { get; set; } = "/mqtt";
public int ReceiveBufferSize { get; set; } = 4096;
public int KeepAliveInterval { get; set; } = 120;
public List<string> AllowedOrigins { get; set; }
}
}