bertmelis/espMqttClient

Question about async client

Closed this issue · 1 comments

Hi,

In my project I already have a network task, and as such I'd like to change to the async client so I can save those 5000 bytes of stack.

I'm a bit confused though, usually the "mqttclient" task calls the loop() function, which I want to call now from my network task, but it's protected. I've also not really seen another way of calling it, how is this supposed to be achieved?

Also, as far as I can see there's only an espMqttClientAsync, not an espMqttClientSecureAsync, is this as it's to be and there's some trick to it, or it it just missing?

AsyncTCP (on ESP32) doesn't support TLS. ESPAsyncTCP does support TLS but it is outdated. Therefore I haven't included a secure version for the async versions.

Yes, espMqttClient has it's own task on ESP32 which calls loop(). I did think about giving the user the option to call loop() themselves but I haven't looked into the implications of this change (yet).

May I assume this might be a feature request for you?