mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 01:03:01 +08:00
* [Server] Fixed an issue with not correctly removed old client sessions. * [Server] Several minor performance improvements. * [Server] An existing client session is no longer closed if a new client connection is invalid. * [Client] Added support for sending "CleanSession" flag.
24 lines
616 B
C#
24 lines
616 B
C#
using System;
|
|
|
|
namespace MQTTnet.Core.Client
|
|
{
|
|
public class MqttClientOptions
|
|
{
|
|
public string Server { get; set; }
|
|
|
|
public int Port { get; set; } = 1883;
|
|
|
|
public string UserName { get; set; }
|
|
|
|
public string Password { get; set; }
|
|
|
|
public string ClientId { get; set; } = Guid.NewGuid().ToString().Replace("-", string.Empty);
|
|
|
|
public bool CleanSession { get; set; } = true;
|
|
|
|
public TimeSpan KeepAlivePeriod { get; set; } = TimeSpan.FromSeconds(5);
|
|
|
|
public TimeSpan DefaultCommunicationTimeout { get; set; } = TimeSpan.FromSeconds(10);
|
|
}
|
|
}
|