/// <summary> /// 启动 /// </summary> public void Start(string clientID = null, string username = "******", string password = "******") { if (m_initialized == false) { throw new ApplicationException(string.Format("USeManager is not initialized ,can not start", this)); } if (m_mqttService != null) { try { m_mqttService.Start(clientID, username, password); } catch (Exception ex) { Logger.LogError(String.Format("{0} 启动MQTT服务异常, Error: {1}", m_mqttService, ex.Message)); } } }
/// <summary> /// 启动 /// </summary> public void Start(string clientID = null, string username = "******", string password = "******") { Logger.LogInfo("启动MQTT对象开始"); if (m_initialized == false) { Logger.LogError("MQTT对象尚未初始化"); } if (m_mqttService != null) { try { m_mqttService.Start(clientID, username, password); } catch (Exception ex) { Logger.LogError(String.Format("{0} 启动MQTT服务异常, Error: {1}", m_mqttService, ex.Message)); } } Logger.LogInfo("启动MQTT对象结束"); }