You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
755 B

  1. using MQTTnet.Core.Serializer;
  2. namespace MQTTnet.Core.Packets
  3. {
  4. public sealed class MqttConnectPacket: MqttBasePacket
  5. {
  6. public MqttProtocolVersion ProtocolVersion { get; set; }
  7. public string ClientId { get; set; }
  8. public string Username { get; set; }
  9. public string Password { get; set; }
  10. public ushort KeepAlivePeriod { get; set; }
  11. public bool CleanSession { get; set; }
  12. public MqttApplicationMessage WillMessage { get; set; }
  13. public override string ToString()
  14. {
  15. return $"{nameof(MqttConnectPacket)} [ClientId={ClientId}] [Username={Username}] [Password={Password}] [KeepAlivePeriod={KeepAlivePeriod}] [CleanSession={CleanSession}]";
  16. }
  17. }
  18. }