NetworkSocketAPI
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Revision 60:0360cb987da3, committed 2016-02-25
- Comitter:
- Christopher Haster
- Date:
- Thu Feb 25 22:02:08 2016 -0600
- Parent:
- 59:badee747a030
- Child:
- 61:168d22423ed0
- Commit message:
- Removed getNetworkMask/getGateway
Changed in this revision
NetworkInterface.cpp | Show annotated file Show diff for this revision Revisions of this file |
NetworkInterface.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/NetworkInterface.cpp Thu Feb 25 21:52:57 2016 -0600 +++ b/NetworkInterface.cpp Thu Feb 25 22:02:08 2016 -0600 @@ -15,29 +15,8 @@ */ #include "NetworkInterface.h" -#include "UDPSocket.h" #include "DnsQuery.h" -#include <string.h> - -const char *NetworkInterface::getIPAddress() -{ - return 0; -} -const char *NetworkInterface::getNetworkMask() -{ - return 0; -} - -const char *NetworkInterface::getGateway() -{ - return 0; -} - -const char *NetworkInterface::getMACAddress() -{ - return 0; -} bool NetworkInterface::isConnected() {
--- a/NetworkInterface.h Thu Feb 25 21:52:57 2016 -0600 +++ b/NetworkInterface.h Thu Feb 25 22:02:08 2016 -0600 @@ -52,24 +52,14 @@ /** Get the IP address - * @return IP address of the interface - */ - virtual const char *getIPAddress(); - - /** Get the network mask - * @return Network mask of the interface + * @return IP address of the interface or 0 if not yet connected */ - virtual const char *getNetworkMask(); - - /** Get the gateway - * @return Gateway address of the interface - */ - virtual const char *getGateway(); + virtual const char *getIPAddress() = 0; /** Get the current MAC address * @return String MAC address of the interface */ - virtual const char *getMACAddress(); + virtual const char *getMACAddress() = 0; /** Get the current status of the interface * @return true if connected @@ -84,6 +74,7 @@ */ virtual int32_t getHostByName(const char *name, char *ip); + protected: friend class Socket;