AsyncUDP: Added lastErr helper variable (#4789)

The variable is useful when debugging AsyncUDP send problems.
The upper application can read and analyze the error reason.
This commit is contained in:
Andre Lorbach
2021-02-16 01:21:53 +01:00
committed by GitHub
parent e831680a41
commit f13ff65691
2 changed files with 14 additions and 7 deletions

View File

@ -95,6 +95,7 @@ protected:
udp_pcb *_pcb;
//xSemaphoreHandle _lock;
bool _connected;
esp_err_t _lastErr;
AuPacketHandlerFunction _handler;
bool _init();
@ -144,6 +145,7 @@ public:
IPAddress listenIP();
IPv6Address listenIPv6();
bool connected();
esp_err_t lastErr();
operator bool();
static void _s_recv(void *arg, udp_pcb *upcb, pbuf *p, const ip_addr_t *addr, uint16_t port, struct netif * netif);