mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 09:13:02 +08:00
27 lines
787 B
C#
27 lines
787 B
C#
using MQTTnet.Core.Serializer;
|
|
|
|
namespace MQTTnet.Core.Packets
|
|
{
|
|
public sealed class MqttConnectPacket : MqttBasePacket
|
|
{
|
|
public MqttProtocolVersion ProtocolVersion { get; set; }
|
|
|
|
public string ClientId { get; set; }
|
|
|
|
public string Username { get; set; }
|
|
|
|
public string Password { get; set; }
|
|
|
|
public ushort KeepAlivePeriod { get; set; }
|
|
|
|
public bool CleanSession { get; set; }
|
|
|
|
public MqttApplicationMessage WillMessage { get; set; }
|
|
|
|
public override string ToString()
|
|
{
|
|
return nameof(MqttConnectPacket) + ": [ClientId=" + ClientId + "] [Username=" + Username + "] [Password=" + Password + "] [KeepAlivePeriod=" + KeepAlivePeriod + "] [CleanSession=" + CleanSession + "]";
|
|
}
|
|
}
|
|
}
|