Пример #1
0
        public Mqtt(MQTTConnection connection)
        {
            _connection = connection;
            _topicMatcher = new MqttTopicMatcher();
            _handlers = new List<MqttHandler>();

            _connection.MqttMsgPublishReceived += OnConnectionOnMqttMsgPublishReceived;
        }
Пример #2
0
        public Mqtt(MQTTConnection connection)
        {
            _connection   = connection;
            _topicMatcher = new MqttTopicMatcher();
            _handlers     = new List <MqttHandler>();

            _connection.MqttMsgPublishReceived += OnConnectionOnMqttMsgPublishReceived;
        }
Пример #3
0
        public MqttRouter(IMqttClient connection)
        {
            _connection   = connection;
            _topicMatcher = new MqttTopicMatcher();
            _handlers     = new List <MqttHandler>();

            connection
            .MessageStream
            .Subscribe(msg => MqttMsgReceived(msg));
        }