WLED/wled00/net_debug.h

19 lines
496 B
C
Raw Normal View History

2021-08-25 07:12:03 +02:00
#ifndef WLED_NET_DEBUG_H
#define WLED_NET_DEBUG_H
#include <WString.h>
#include <WiFiUdp.h>
class NetworkDebugPrinter : public Print {
private:
WiFiUDP debugUdp; // needs to be here otherwise UDP messages get truncated upon destruction
2022-11-11 18:17:12 +01:00
IPAddress debugPrintHostIP;
public:
virtual size_t write(uint8_t c);
virtual size_t write(const uint8_t *buf, size_t s);
2021-08-25 07:12:03 +02:00
};
2023-02-04 23:59:28 +01:00
// use it on your linux/macOS with: nc -p 7868 -u -l -s <network ip>
2021-08-25 07:12:03 +02:00
extern NetworkDebugPrinter NetDebug;
#endif