1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-26 07:02:15 +03:00

Fix UdpClient semantics, add NTPClient example

UdpClient used to create a new socket for each begin/beginPacket call. This made bidirectional communication impossible.
Fix #64, fix #53.
This commit is contained in:
Ivan Grokhotkov
2015-04-12 01:09:45 +08:00
parent 89fe3daa85
commit b026daf43b
5 changed files with 170 additions and 9 deletions

View File

@ -120,6 +120,14 @@ public:
return ntohs(udphdr->src);
}
uint16_t getLocalPort()
{
if (!_pcb)
return 0;
return _pcb->local_port;
}
bool next()
{
if (!_rx_buf)