Extend MQTTnet.Server application.

This commit is contained in:
Christian
2019-03-05 21:37:00 +01:00
parent b68247f56d
commit 6f5f507323
32 changed files with 1114 additions and 309 deletions
@@ -0,0 +1,9 @@
namespace MQTTnet.Server.Configuration
{
public class EndpointConfiguration
{
public int Port { get; set; } = 1883;
public int BacklogSize { get; set; } = 10;
}
}
@@ -0,0 +1,30 @@
namespace MQTTnet.Server.Configuration
{
/// <summary>
/// Listen Entry Settings Model
/// </summary>
public class ListenModel
{
/// <summary>
/// Constructor
/// </summary>
public ListenModel()
{
}
/// <summary>
/// Listen Address
/// </summary>
public string Address { get; set; }
/// <summary>
/// Listen Port
/// </summary>
public int Port { get; set; }
/// <summary>
/// Protocol Type
/// </summary>
public ListenProtocolTypes Protocol { get; set; } = ListenProtocolTypes.HTTP;
}
}
@@ -0,0 +1,23 @@
namespace MQTTnet.Server.Configuration
{
/// <summary>
/// Listen Protocol Types
/// </summary>
public enum ListenProtocolTypes
{
/// <summary>
/// HTTP
/// </summary>
HTTP = 0,
/// <summary>
/// HTTPS
/// </summary>
HTTPS = 1,
/// <summary>
/// MQTT
/// </summary>
MQTT = 20
}
}
@@ -0,0 +1,7 @@
namespace MQTTnet.Server.Configuration
{
public class MqttNetServerConfiguration
{
}
}
@@ -0,0 +1,15 @@
using System.Collections.Generic;
namespace MQTTnet.Server.Configuration
{
/// <summary>
/// Main Settings Model
/// </summary>
public class SettingsModel
{
/// <summary>
/// Listen Settings
/// </summary>
public IEnumerable<ListenModel> Listen { get; set; }
}
}