Replies: 4 comments 1 reply
-
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 May I assume this might be a feature request for you? |
Beta Was this translation helpful? Give feedback.
-
ok, thanks for the clarification. I was already a bit confused about the naming being async. I noticed the espMqttClientAsync calls the constructor of MqttClientSetup (and this MqttClient) with useTask=false, so xTaskCreatePinnedToCore() isn't called in the constructor of MqttClient, which was the actual thing I wanted to achieve. I can configure my own MqttClientSetup instead. Yes, this would be a feature request, it's main purpose being saving memory for an additional task. Would you make loop() public? |
Beta Was this translation helpful? Give feedback.
-
I just found a simple way to do it without making loop() public: Add a public method to my mqtt client setup that calls the protected method. Maybe a good solution is to rename the protected loop() to something like loopInternal() and provide an espMqttClient that has such a public loop() method that calls the internalLoop() method. |
Beta Was this translation helpful? Give feedback.
-
Created #73 |
Beta Was this translation helpful? Give feedback.
-
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?
Beta Was this translation helpful? Give feedback.
All reactions