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

MqttClientOptions.cs 1003 B

7 年前
123456789101112131415161718192021
  1. using System;
  2. using MQTTnet.Serializer;
  3. namespace MQTTnet.Client
  4. {
  5. public class MqttClientOptions : IMqttClientOptions
  6. {
  7. public string ClientId { get; set; } = Guid.NewGuid().ToString("N");
  8. public bool CleanSession { get; set; } = true;
  9. public IMqttClientCredentials Credentials { get; set; } = new MqttClientCredentials();
  10. public MqttProtocolVersion ProtocolVersion { get; set; } = MqttProtocolVersion.V311;
  11. public IMqttClientChannelOptions ChannelOptions { get; set; }
  12. public TimeSpan CommunicationTimeout { get; set; } = TimeSpan.FromSeconds(10);
  13. public TimeSpan KeepAlivePeriod { get; set; } = TimeSpan.FromSeconds(15);
  14. public TimeSpan? KeepAliveSendInterval { get; set; }
  15. public MqttReceivedApplicationMessageProcessingMode ReceivedApplicationMessageProcessingMode { get; set; } = MqttReceivedApplicationMessageProcessingMode.SingleThread;
  16. public MqttApplicationMessage WillMessage { get; set; }
  17. }
  18. }