mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 19:13:11 +08:00
Extend MQTTnet.Server application.
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user