Skip to content

Commit 64dabb5

Browse files
committed
WiFi client connect with hostname
1 parent 25cab43 commit 64dabb5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libraries/ESP8266WiFi/src/WiFiClient.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ WiFiClient& ICACHE_FLASH_ATTR WiFiClient::operator=(const WiFiClient& other)
7474

7575
int ICACHE_FLASH_ATTR WiFiClient::connect(const char* host, uint16_t port)
7676
{
77-
// IPAddress remote_addr;
78-
// if (WiFi.hostByName(host, remote_addr))
79-
// {
80-
// return connect(remote_addr, port);
81-
// }
77+
IPAddress remote_addr;
78+
if (WiFi.hostByName(host, remote_addr))
79+
{
80+
return connect(remote_addr, port);
81+
}
8282
return 0;
8383
}
8484

0 commit comments

Comments
 (0)