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
Revision 48:6031f70e3914, committed 2015-06-04
- Comitter:
- geky
- Date:
- Thu Jun 04 20:45:00 2015 +0000
- Parent:
- 47:04632d22a723
- Commit message:
- Fix for not using full buffer in TCP recieve
Changed in this revision
| Socket/TCPSocketConnection.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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