NetworkSocketAPI

Dependencies:   DnsQuery

Dependents:   HelloWizFi250Interface

Fork of NetworkSocketAPI by NetworkSocketAPI

Files at this revision

API Documentation at this revision

Comitter:
Christopher Haster
Date:
Thu Feb 18 06:16:11 2016 -0600
Branch:
api-changes
Parent:
25:ed7b2a52e8ac
Child:
27:d7ed39727306
Commit message:
Moved abstract constructors to protected regions

Changed in this revision

EthernetInterface.h 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
SocketInterface.h Show annotated file Show diff for this revision Revisions of this file
WiFiInterface.h Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.h	Thu Feb 18 06:01:55 2016 -0600
+++ b/EthernetInterface.h	Thu Feb 18 06:16:11 2016 -0600
@@ -26,7 +26,6 @@
 class EthernetInterface : public NetworkInterface
 {
 public:
-
     /** Start the interface
      *  @param timeout_ms Time in milliseconds to wait for a connection
      *  @return 0 on success
--- a/NetworkInterface.h	Thu Feb 18 06:01:55 2016 -0600
+++ b/NetworkInterface.h	Thu Feb 18 06:16:11 2016 -0600
@@ -28,10 +28,6 @@
 class NetworkInterface
 {
 public:
-    NetworkInterface();
-    virtual ~NetworkInterface();
-
-
     /** Enables DHCP and clears any static address
      *  DHCP is enabled by default
      *  @return 0 on success
@@ -78,8 +74,10 @@
      */
     virtual bool isConnected(void);
 
+protected:
+    NetworkInterface();
+    virtual ~NetworkInterface();
 
-private:
     friend class Socket;
 
     /** Internally create a socket
--- a/SocketInterface.h	Thu Feb 18 06:01:55 2016 -0600
+++ b/SocketInterface.h	Thu Feb 18 06:16:11 2016 -0600
@@ -36,10 +36,6 @@
 class SocketInterface
 {
 public:
-    SocketInterface();
-    virtual ~SocketInterface();
-
-
     /** Set the URL of the socket
      *  Performs DNS lookup if necessary
      *  @param url URL to connect to
@@ -95,6 +91,10 @@
      */
     virtual int32_t recv(void *data, uint32_t len, uint32_t timeout_ms) = 0;
 
+protected:
+    SocketInterface();
+    virtual ~SocketInterface();
+
 private:
     char *_ip_address;
     uint16_t _port;
--- a/WiFiInterface.h	Thu Feb 18 06:01:55 2016 -0600
+++ b/WiFiInterface.h	Thu Feb 18 06:16:11 2016 -0600
@@ -35,7 +35,6 @@
 class WiFiInterface : public NetworkInterface
 {
 public:
-
     /** Start the interface
      *  @param ssid Name of the network to connect to
      *  @param pass Security passphrase to connect to the network