esp32_ethernet_milight_hub/lib/Udp/MiLightDiscoveryServer.h

26 lines
525 B
C
Raw Normal View History

2021-01-15 21:49:01 +00:00
#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