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