IMChatConfig.js 1.0 KB

123456789101112131415161718192021222324
  1. angular.module('push')
  2. .factory('IMChatConfig', function () {
  3. // MQTT 通讯参数配置
  4. var iMChatConfig = {};
  5. //TODO1 --MQTT服务器地址端口配置
  6. // iMChatConfig.host = "192.168.0.138";//开发地址
  7. // iMChatConfig.port = 8090;//开发端口(默认1883)
  8. //iMChatConfig.host = "192.168.1.30";//测试地址
  9. //iMChatConfig.port = 1883;//测试端口
  10. iMChatConfig.host = "117.81.233.247";//正式地址
  11. iMChatConfig.port = 23698;//正式端口
  12. iMChatConfig.clientId = "";//Unique Identifier for the Client
  13. iMChatConfig.username = "0";
  14. iMChatConfig.password = "0";
  15. iMChatConfig.ssl = false;//should ssl be used
  16. iMChatConfig.keepAlive = 180;//keepAlive sending interval in seconds
  17. iMChatConfig.timeout = 15;//session timeouts after <timeout> seconds
  18. iMChatConfig.cleanSession = false;//clean Session at disconnect
  19. iMChatConfig.protocol = 4;//mqtt protocol level
  20. iMChatConfig.qos = 1;//Quality of Service level
  21. iMChatConfig.topic = "";//订阅的主题
  22. return iMChatConfig;
  23. });