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:
parent
25cab439f0
commit
64dabb53f5
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user