BrokerSettings.cs 718 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Xml.Serialization;
  3. using UnityEngine;
  4. namespace M2MqttUnity
  5. {
  6. /// <summary>
  7. /// Serializable settings for MQTT broker configuration.
  8. /// </summary>
  9. [Serializable]
  10. [XmlType(TypeName = "broker-settings")]
  11. public class BrokerSettings
  12. {
  13. [Tooltip("Address of the host running the broker")]
  14. public string host = "localhost";
  15. [Tooltip("Port used to access the broker")]
  16. public int port = 1883;
  17. [Tooltip("Encrypted access to the broker")]
  18. public bool encrypted = false;
  19. [Tooltip("Optional alternate addresses, used if the previous host is not accessible")]
  20. public string[] alternateAddress;
  21. }
  22. }