NetworkSocketAPI

Dependencies:   DnsQuery

Dependents:   HelloWizFi250Interface

Fork of NetworkSocketAPI by NetworkSocketAPI

Branch:
api-changes
Revision:
41:3ec1c97e9bbf
Parent:
40:11d4a94df3f7
Child:
42:49893d13c432
--- a/NetworkInterface.h	Mon Feb 22 23:52:09 2016 -0600
+++ b/NetworkInterface.h	Tue Feb 23 04:01:38 2016 -0600
@@ -70,12 +70,23 @@
      *  @return String MAC address of the interface
      */
     virtual const char *getMACAddress() = 0;
+    
+    /** Set a timeout on network operations
+     *  @param timeout Maximum time in milliseconds for socket operations
+     */
+    virtual void setTimeout(uint32_t timeout);
+
+    /** Get the current timeout on network operations
+     *  @return Maximum time in milliseconds for socket operations
+     */
+    virtual uint32_t getTimeout();
+    
 
     /** Get the current status of the interface
      *  @return true if connected
      */
     virtual bool isConnected(void);
-    
+
     /** Looks up the specified host's IP address
      *  @param name URL of host
      *  @param ip Buffer to hold IP address, must be at least SOCK_IP_SIZE
@@ -104,6 +115,7 @@
     char _ip_address[SOCK_IP_SIZE];
     char _network_mask[SOCK_IP_SIZE];
     char _gateway[SOCK_IP_SIZE];
+    uint32_t _timeout;
 };
 
 #endif