pefect / NetworkSocketAPI

Dependencies:   DnsQuery

Dependents:   WizFi310_TCP_Echo_Server_Example

Fork of NetworkSocketAPI by NetworkSocketAPI

Branch:
api-changes
Revision:
43:09ea32f2eb54
Parent:
42:49893d13c432
Child:
48:b3bbe28a7963
--- a/SocketInterface.h	Tue Feb 23 05:07:02 2016 -0600
+++ b/SocketInterface.h	Wed Feb 24 22:04:19 2016 -0600
@@ -39,22 +39,26 @@
     /** Set the IP address of the socket
      *  @param ip IP address to connect to
      */
-    virtual void setIPAddress(const char *ip);
+    virtual void setIPAddress(const char *ip) { (void)ip; }
 
     /** Set the port of the socket
      *  @param port Port to connect to
      */
-    virtual void setPort(uint16_t port);
+    virtual void setPort(uint16_t port) { (void)port; }
 
     /** Set a timeout on network operations
      *  @param timeout Maximum time in milliseconds for socket operations
      */
-    virtual void setTimeout(uint32_t timeout);
+    virtual void setTimeout(uint32_t timeout) { (void)timeout; }
 
     /** Status of the socket
      *  @return True if connected
      */
-    virtual bool isConnected();
+    virtual bool isConnected()
+    {
+        // By default return true if socket was created successfully
+        return true;
+    }
 
     /** Open a connection to the underlying address
      *  @param ip IP address to connect to