diff options
Diffstat (limited to 'cores/arduino/IPAddress.h')
-rw-r--r-- | cores/arduino/IPAddress.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cores/arduino/IPAddress.h b/cores/arduino/IPAddress.h index 94acdc4..d762f2c 100644 --- a/cores/arduino/IPAddress.h +++ b/cores/arduino/IPAddress.h @@ -21,7 +21,8 @@ #define IPAddress_h #include <stdint.h> -#include <Printable.h> +#include "Printable.h" +#include "WString.h" // A class to make it easier to handle and pass around IP addresses @@ -45,6 +46,9 @@ public: IPAddress(uint32_t address); IPAddress(const uint8_t *address); + bool fromString(const char *address); + bool fromString(const String &address) { return fromString(address.c_str()); } + // Overloaded cast operator to allow IPAddress objects to be used where a pointer // to a four-byte uint8_t array is expected operator uint32_t() const { return _address.dword; }; @@ -71,5 +75,4 @@ public: const IPAddress INADDR_NONE(0,0,0,0); - #endif |