您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

23 行
650 B

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