public MqttManager() { // create managers (publisher, subscriber, session and UAC) this.subscriberManager = new MqttSubscriberManager(); this.sessionManager = new MqttSessionManager(); this.publisherManager = new MqttPublisherManager(this.subscriberManager, this.sessionManager); this.uacManager = new MqttUacManager(); this.clients = new MqttClientCollection(); mqttBridge = Composable.GetExport<IMqttBridge>(); }
/// <summary> /// Constructor /// </summary> /// <param name="commLayer">Communication layer to use (TCP)</param> /// <param name="settings">Broker settings</param> public MqttBroker(IMqttCommunicationLayer commLayer, MqttSettings settings) { // MQTT broker settings this.settings = settings; // MQTT communication layer this.commLayer = commLayer; this.commLayer.ClientConnected += commLayer_ClientConnected; // create managers (publisher, subscriber, session and UAC) this.subscriberManager = new MqttSubscriberManager(); this.sessionManager = new MqttSessionManager(); this.publisherManager = new MqttPublisherManager(this.subscriberManager, this.sessionManager); this.uacManager = new MqttUacManager(); this.clients = new MqttClientCollection(); }