123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
-
- namespace uPLibrary.Networking.M2Mqtt
- {
-
-
-
- public class MqttSettings
- {
-
- public const int MQTT_BROKER_DEFAULT_PORT = 1883;
- public const int MQTT_BROKER_DEFAULT_SSL_PORT = 8883;
-
- public const int MQTT_DEFAULT_TIMEOUT = 30000;
-
- public const int MQTT_ATTEMPTS_RETRY = 3;
-
- public const int MQTT_DELAY_RETRY = 10000;
-
-
- public const int MQTT_CONNECT_TIMEOUT = 30000;
-
- public const int MQTT_MAX_INFLIGHT_QUEUE_SIZE = int.MaxValue;
-
-
-
- public int Port { get; internal set; }
-
-
-
- public int SslPort { get; internal set; }
-
-
-
- public int TimeoutOnConnection { get; internal set; }
-
-
-
- public int TimeoutOnReceiving { get; internal set; }
-
-
-
- public int AttemptsOnRetry { get; internal set; }
-
-
-
- public int DelayOnRetry { get; internal set; }
-
-
-
- public int InflightQueueSize { get; set; }
-
-
-
-
- public static MqttSettings Instance
- {
- get
- {
- if (instance == null)
- instance = new MqttSettings();
- return instance;
- }
- }
-
- private static MqttSettings instance;
-
-
-
- private MqttSettings()
- {
- this.Port = MQTT_BROKER_DEFAULT_PORT;
- this.SslPort = MQTT_BROKER_DEFAULT_SSL_PORT;
- this.TimeoutOnReceiving = MQTT_DEFAULT_TIMEOUT;
- this.AttemptsOnRetry = MQTT_ATTEMPTS_RETRY;
- this.DelayOnRetry = MQTT_DELAY_RETRY;
- this.TimeoutOnConnection = MQTT_CONNECT_TIMEOUT;
- this.InflightQueueSize = MQTT_MAX_INFLIGHT_QUEUE_SIZE;
- }
- }
- }
|