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:
@ -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)
|
||||
|
Reference in New Issue
Block a user