I am currently going through and cleaning my code and have stumbled into a little bit of an issue that I am currently solving with Global Variables.
This issue is due as I am calling for DNS to resolve a hostname which is an Async function call back. The problem is afterward the function I then call that connects a specific event has to be hardcoded into the function due to the AsyncCall back not having an optional Void * to pass to it when the core function is being started, whether it's just connecting to a remote host or getting an IP resolved from DNS, Both of these functions lack a Void *.
What is the correct way to do this so that once DNS is resolved and the sockets are created? Sadly I have to set a Global flag to keep track of the workflow and it's in my mind kinda hackish, any thoughts?
Who is online
Users browsing this forum: No registered users and 16 guests
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!