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/UDPSocket.cpp
- Revision:
- 22:c4360e61486a
- Parent:
- 21:690526f05fe6
- Child:
- 23:de9221771e96
diff -r 690526f05fe6 -r c4360e61486a Socket/UDPSocket.cpp
--- a/Socket/UDPSocket.cpp Tue Dec 02 04:16:26 2014 +0000
+++ b/Socket/UDPSocket.cpp Tue Dec 02 16:02:21 2014 +0000
@@ -68,7 +68,8 @@
int idx = 0;
int nb_available = 0;
int time = -1;
-
+ tmr.start();
+
if (_blocking) {
while (1) {
nb_available = wifi->readable();
@@ -78,7 +79,7 @@
}
}
else {
- tmr.start();
+ tmr.reset();
while (time < _timeout){
nb_available = wifi->readable();
@@ -90,8 +91,7 @@
if (nb_available == 0) return nb_available;
}
- tmr.start();
-
+ tmr.reset();
while (time < _timeout) {
nb_available = wifi->readable();
@@ -106,7 +106,6 @@
time = tmr.read_ms();
}
-
readEndpoint(remote);
return (idx == 0) ? -1 : idx;
}

Adafruit Huzzah