client.connect always returns false, why?
Posted: Wed May 11, 2016 12:06 am
My "host" constant is a local address that I can get to in a web browser and it works fine, but...
Using this code the result is always connecton faled...
// Use WiFiClient class to create TCP connections
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println(String(host) + " : connection failed");
return;
}
What does client.connect need as a response from my API to return true?
Using this code the result is always connecton faled...
// Use WiFiClient class to create TCP connections
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println(String(host) + " : connection failed");
return;
}
What does client.connect need as a response from my API to return true?