merge ipaddress fix from esp8266-react

This commit is contained in:
proddy
2021-03-08 12:54:44 +01:00
parent 9d5bd11d26
commit 0aefaaef55
5 changed files with 25 additions and 5 deletions

18
lib/framework/IPUtils.h Normal file
View 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