Multiple non-blocking connections? #2670
-
I need to do multiple http client requests at startup. My vision is to have a single global instance of mg_mgr and run multiple connections from that. The examples have an infinite event loop. How can I get around that? I have other operations, that read sensors and control devices connected to the ESP32, that will be performed periodically using a timer. Am I looking at this the wrong way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There are lots of examples where we show a single mg_mgr, there is no actual need for more than one. See how we handle ESP32 in those examples, there's nothing wrong with having an infinite loop, nothing forces you to have only one call there nor sleep forever. |
Beta Was this translation helpful? Give feedback.
There are lots of examples where we show a single mg_mgr, there is no actual need for more than one.
Please follow the guidelines in the documentation, examples and tutorials available.
See how we handle ESP32 in those examples, there's nothing wrong with having an infinite loop, nothing forces you to have only one call there nor sleep forever.