mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 17:00:03 +08:00
28 lines
850 B
C#
28 lines
850 B
C#
using System;
|
|
using MQTTnet.Core.Serializer;
|
|
|
|
namespace MQTTnet.Core.Client
|
|
{
|
|
public class MqttClientOptions : IMqttClientOptions
|
|
{
|
|
public MqttApplicationMessage WillMessage { get; set; }
|
|
|
|
public string ClientId { get; set; } = Guid.NewGuid().ToString("N");
|
|
|
|
/// <inheritdoc />
|
|
public string LogId { get; set; }
|
|
|
|
public bool CleanSession { get; set; } = true;
|
|
|
|
public IMqttClientCredentials Credentials { get; set; } = new MqttClientCredentials();
|
|
|
|
public TimeSpan KeepAlivePeriod { get; set; } = TimeSpan.FromSeconds(5);
|
|
|
|
public TimeSpan CommunicationTimeout { get; set; } = TimeSpan.FromSeconds(10);
|
|
|
|
public MqttProtocolVersion ProtocolVersion { get; set; } = MqttProtocolVersion.V311;
|
|
|
|
public IMqttClientChannelOptions ChannelOptions { get; set; }
|
|
}
|
|
}
|