A fork of the original interface for OS/2. Features a correctly-implemented recv (but retains the old behavior via recv2).

Dependencies:   BufferedSerial

Dependents:   weather_clock weather_clock

Revision:
49:cac09a34102c
Parent:
48:6031f70e3914
Child:
50:f484783b8a34
diff -r 6031f70e3914 -r cac09a34102c Socket/TCPSocketConnection.cpp
--- a/Socket/TCPSocketConnection.cpp	Thu Jun 04 20:45:00 2015 +0000
+++ b/Socket/TCPSocketConnection.cpp	Sun Mar 31 00:53:46 2019 +0000
@@ -128,12 +128,13 @@
 int TCPSocketConnection::receive(char* buffer, int length)
 {
     if (!_is_connected) {
-        ERR("TCPSocketConnection::receive() - _is_connected is false : you cant receive data untill you connect to a socket!");
+        ERR("TCPSocketConnection::receive() - _is_connected is false : you cant receive data until you connect to a socket!");
         return -1;
     }
     
-    while (wifi->readable() < length)
-        ;
+    while (wifi->readable() < length) {
+        wait(0.01);
+    }
         
     if (!wifi->recv(buffer, &length))
         return -1;