This commit is contained in:
proddy
2025-01-04 13:41:39 +01:00
parent 4138598db2
commit eb87651c47
166 changed files with 2099 additions and 10446 deletions

22
src/ESP32React/IPUtils.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef IPUtils_h
#define IPUtils_h
#include <IPAddress.h>
class IPUtils {
public:
static bool isSet(const IPAddress & ip) {
return ip != getNotSetIP();
}
static bool isNotSet(const IPAddress & ip) {
return ip == getNotSetIP();
}
private:
static const IPAddress & getNotSetIP() {
static const IPAddress IP_NOT_SET = IPAddress(INADDR_NONE);
return IP_NOT_SET;
}
};
#endif