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

27 行
756 B

  1. using MQTTnet.Serializer;
  2. namespace MQTTnet.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 "Connect: [ClientId=" + ClientId + "] [Username=" + Username + "] [Password=" + Password + "] [KeepAlivePeriod=" + KeepAlivePeriod + "] [CleanSession=" + CleanSession + "]";
  16. }
  17. }
  18. }