Files
WLED_MM_Infinity/wled00/net_debug.h
Frank 3d80f503cd make netDegug work with MIC_LOGGER
adding a dummy "´flush()" method to NetDebug that does nothing
2022-12-20 17:47:33 +01:00

20 lines
643 B
C++

#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
IPAddress debugPrintHostIP;
public:
virtual size_t write(uint8_t c);
virtual size_t write(const uint8_t *buf, size_t s);
virtual void flush(void) { return;} // WLEDMM adding flush() method - does nothing as we cannot use debugUdp.flush() which clears _input_ buffers
virtual void flush( bool txOnly) { return;} // WLEDMM
};
extern NetworkDebugPrinter NetDebug;
#endif