-->
Page 1 of 1

client.connect always returns false, why?

PostPosted: Wed May 11, 2016 12:06 am
by ethanvandal
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?