NetworkSocketAPI
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Diff: SocketAddress.h
- Revision:
- 87:94e2cf3a06be
- Parent:
- 80:9c6673c93082
- Child:
- 89:b1d417383c0d
--- a/SocketAddress.h Tue Apr 05 23:39:54 2016 +0000 +++ b/SocketAddress.h Tue Apr 05 23:47:04 2016 +0000 @@ -19,6 +19,14 @@ #include <stdint.h> +/** Maximum size of IP address +*/ +#define NSAPI_IP_SIZE 16 + +/** Maximum size of MAC address +*/ +#define NSAPI_MAC_SIZE 18 + // Predeclared classes class NetworkInterface; @@ -27,10 +35,6 @@ */ class SocketAddress { public: - /** Maximum size of IP address - */ - static const int IP_SIZE = 16; - /** SocketAddress construction using DNS resolution /param iface NetworkInterface to use for DNS resolution /param addr Null-terminated hostname that will be resolved @@ -72,7 +76,7 @@ uint16_t get_port(void) const; private: - char _ip_address[IP_SIZE]; + char _ip_address[NSAPI_IP_SIZE]; uint16_t _port; };