mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
merge ipaddress fix from esp8266-react
This commit is contained in:
18
lib/framework/IPUtils.h
Normal file
18
lib/framework/IPUtils.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef IPUtils_h
|
||||
#define IPUtils_h
|
||||
|
||||
#include <IPAddress.h>
|
||||
|
||||
const IPAddress IP_NOT_SET = IPAddress(INADDR_NONE);
|
||||
|
||||
class IPUtils {
|
||||
public:
|
||||
static bool isSet(const IPAddress & ip) {
|
||||
return ip != IP_NOT_SET;
|
||||
}
|
||||
static bool isNotSet(const IPAddress & ip) {
|
||||
return ip == IP_NOT_SET;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // end IPUtils_h
|
||||
Reference in New Issue
Block a user