1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

WiFi client connect with hostname

This commit is contained in:
Ivan Grokhotkov 2014-12-17 10:29:29 +03:00
parent 25cab439f0
commit 64dabb53f5

View File

@ -74,11 +74,11 @@ WiFiClient& ICACHE_FLASH_ATTR WiFiClient::operator=(const WiFiClient& other)
int ICACHE_FLASH_ATTR WiFiClient::connect(const char* host, uint16_t port)
{
// IPAddress remote_addr;
// if (WiFi.hostByName(host, remote_addr))
// {
// return connect(remote_addr, port);
// }
IPAddress remote_addr;
if (WiFi.hostByName(host, remote_addr))
{
return connect(remote_addr, port);
}
return 0;
}