Example #1
0
 public MqttClient(
     ILogger <MqttClient> logger,
     IOptions <MqttClientOptions> options)
 {
     _options = options.Value;
     _logger  = logger ?? NullLogger <MqttClient> .Instance;
     _group   = new MultithreadEventLoopGroup();
 }
Example #2
0
 public MqttClient(IOptions <MqttClientOptions> options,
                   ILogger <MqttClient> logger = default)
 {
     _logger                   = logger ?? NullLogger <MqttClient> .Instance;
     _eventLoopGroup           = new MultithreadEventLoopGroup();
     _packetIdentifierProvider = new PacketIdProvider();
     _packetDispatcher         = new PacketDispatcher();
     _options                  = options.Value;
 }