Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BufferedSerial
Dependents: esp8266_nodeMCU1 esp8266_2_thingspeak1 Solarator_0-0-2 IoTBurglar_and_Fire_AlarmSystem ... more
Fork of ESP8266Interface by
Diff: Socket/TCPSocketConnection.cpp
- Revision:
- 48:6031f70e3914
- Parent:
- 44:16da10e7b3f7
diff -r 04632d22a723 -r 6031f70e3914 Socket/TCPSocketConnection.cpp
--- a/Socket/TCPSocketConnection.cpp Thu Jun 04 20:18:39 2015 +0000
+++ b/Socket/TCPSocketConnection.cpp Thu Jun 04 20:45:00 2015 +0000
@@ -131,6 +131,17 @@
ERR("TCPSocketConnection::receive() - _is_connected is false : you cant receive data untill you connect to a socket!");
return -1;
}
+
+ while (wifi->readable() < length)
+ ;
+
+ if (!wifi->recv(buffer, &length))
+ return -1;
+
+ return length;
+
+
+ /*
Timer tmr;
int idx = 0;
int nb_available = 0;
@@ -196,7 +207,7 @@
}
//---
return (idx == 0) ? -1 : idx;
-
+*/
//************************ original code below
//
// if (!_blocking) {

Adafruit Huzzah