esp32_ethernet_milight_hub/lib/Udp/MiLightDiscoveryServer.h
2021-01-15 22:49:01 +01:00

25 lines
525 B
C++

#include <WiFiUdp.h>
#include <Settings.h>
#ifndef MILIGHT_DISCOVERY_SERVER_H
#define MILIGHT_DISCOVERY_SERVER_H
class MiLightDiscoveryServer {
public:
MiLightDiscoveryServer(Settings& settings);
MiLightDiscoveryServer(MiLightDiscoveryServer&);
MiLightDiscoveryServer& operator=(MiLightDiscoveryServer other);
~MiLightDiscoveryServer();
void begin();
void handleClient();
private:
Settings& settings;
WiFiUDP socket;
void handleDiscovery(uint8_t version);
void sendResponse(char* buffer);
};
#endif