MqttClientTcpOptions.cs 670 B

1234567891011121314151617181920212223242526
  1. using System.Net.Sockets;
  2. namespace MQTTnet.Client.Options
  3. {
  4. public class MqttClientTcpOptions : IMqttClientChannelOptions
  5. {
  6. public string Server { get; set; }
  7. public int? Port { get; set; }
  8. public int BufferSize { get; set; } = 65536;
  9. public bool? DualMode { get; set; }
  10. public bool NoDelay { get; set; } = true;
  11. public AddressFamily AddressFamily { get; set; } = AddressFamily.Unspecified;
  12. public MqttClientTlsOptions TlsOptions { get; set; } = new MqttClientTlsOptions();
  13. public override string ToString()
  14. {
  15. return Server + ":" + this.GetPort();
  16. }
  17. }
  18. }