AgentSmithers wrote:
Hi Everyone,
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?
Depending on the SDK you are using the Socket Structure has a variable called "Reverse" or "Reserve" then can be used to store the callback pointer to your function. CheersStatistics: Posted by AgentSmithers — Thu Jan 25, 2018 2:37 am
]]>