ap

Dependencies:   DnsQuery

Dependents:   WizFi310_TCP_Echo_Server_Example

Fork of NetworkSocketAPI by NetworkSocketAPI

Revision:
115:950b19eb0f02
Parent:
109:5d8bd5752386
Child:
118:96627c4b83d5
--- a/Socket.cpp	Wed Apr 20 11:07:19 2016 -0500
+++ b/Socket.cpp	Wed Apr 20 19:05:03 2016 -0500
@@ -19,8 +19,7 @@
 Socket::Socket()
     : _iface(0)
     , _socket(0)
-    , _blocking(true)
-    , _timeout(0)
+    , _timeout(-1)
 {
 }
 
@@ -83,10 +82,10 @@
 
 void Socket::set_blocking(bool blocking)
 {
-    _blocking = blocking;
+    set_timeout(blocking ? -1 : 0);
 }
 
-void Socket::set_timeout(unsigned timeout)
+void Socket::set_timeout(int timeout)
 {
     _timeout = timeout;
 }