Exemple #1
0
 public Mqtt(MqttConnectionInfo connectionInfo)
 {
     if (connectionInfo == null)
         throw new ArgumentNullException("connectionInfo");
     _connectionInfo = connectionInfo;
     _connectionProvider = new MqttConnectionProvider();
     _listenCallback = new AsyncCallback(_listenCallback);
     _msgFactory = new MqttMessageFactory();
     _headerBuffer = new byte[1];
 }
Exemple #2
0
 public Mqtt(MqttConnectionInfo connectionInfo)
 {
     if (connectionInfo == null)
     {
         throw new ArgumentNullException("connectionInfo");
     }
     _connectionInfo     = connectionInfo;
     _connectionProvider = new MqttConnectionProvider();
     _listenCallback     = new AsyncCallback(_listenCallback);
     _msgFactory         = new MqttMessageFactory();
     _headerBuffer       = new byte[1];
 }