Hello everyone,
I have an Ethernet Shield for my Arduino Mega 2560 and am using the EthernetClient class to connect to a client.
The issue that I am experiencing is that the connect() method can block for seconds at a time, interfering with a requirement that I service a response from another computer connected to my Arduino within a very fast period of time.
What happens currently is that if a connect() call is being made, the loop() method is blocked for the time it takes to connect, and this is exacerbated if I use an IP address that is not assigned to anything. The blocking could go on for 10 or more seconds.
Is there some way to dig deeper into the EthernetClient class to allow for some sort of callback that would be called on either success or failure of a connect, allowing my loop() function to not block?