Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

MqttClientOptions.cs 923 B

pirms 7 gadiem
pirms 7 gadiem
pirms 7 gadiem
pirms 7 gadiem
pirms 7 gadiem
pirms 7 gadiem
123456789101112131415161718192021222324252627282930
  1. using System;
  2. using MQTTnet.Core.Serializer;
  3. namespace MQTTnet.Core.Client
  4. {
  5. public sealed class MqttClientOptions
  6. {
  7. public string Server { get; set; }
  8. public int? Port { get; set; }
  9. public MqttClientTlsOptions TlsOptions { get; set; } = new MqttClientTlsOptions();
  10. public string UserName { get; set; }
  11. public string Password { get; set; }
  12. public string ClientId { get; set; } = Guid.NewGuid().ToString().Replace("-", string.Empty);
  13. public bool CleanSession { get; set; } = true;
  14. public TimeSpan KeepAlivePeriod { get; set; } = TimeSpan.FromSeconds(5);
  15. public TimeSpan DefaultCommunicationTimeout { get; set; } = TimeSpan.FromSeconds(10);
  16. public MqttProtocolVersion ProtocolVersion { get; set; } = MqttProtocolVersion.V311;
  17. public MqttConnectionType ConnectionType { get; set; } = MqttConnectionType.Tcp;
  18. }
  19. }