mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Added ESP32 compatible methods for setting/getting hostname (#7900)
This commit is contained in:
parent
807ed51d0f
commit
22442f0873
@ -64,6 +64,15 @@ String LwipIntf::hostname(void)
|
|||||||
return wifi_station_get_hostname();
|
return wifi_station_get_hostname();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Get ESP8266 station DHCP hostname
|
||||||
|
@return hostname
|
||||||
|
*/
|
||||||
|
const char* LwipIntf::getHostname(void)
|
||||||
|
{
|
||||||
|
return wifi_station_get_hostname();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Set ESP8266 station DHCP hostname
|
Set ESP8266 station DHCP hostname
|
||||||
@param aHostname max length:24
|
@param aHostname max length:24
|
||||||
|
@ -34,6 +34,12 @@ public:
|
|||||||
return hostname(aHostname.c_str());
|
return hostname(aHostname.c_str());
|
||||||
}
|
}
|
||||||
bool hostname(const char* aHostname);
|
bool hostname(const char* aHostname);
|
||||||
|
// ESP32 API compatibility
|
||||||
|
bool setHostname(const char* aHostName)
|
||||||
|
{
|
||||||
|
return hostname(aHostName);
|
||||||
|
}
|
||||||
|
const char* getHostname();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user