mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
23 lines
469 B
C++
23 lines
469 B
C++
#pragma once
|
|
|
|
#include <AsyncWebSocket.h>
|
|
|
|
class CaptiveRequestHandler : public AsyncWebHandler {
|
|
public:
|
|
CaptiveRequestHandler(const char *host);
|
|
|
|
virtual ~CaptiveRequestHandler();
|
|
|
|
bool canHandle(AsyncWebServerRequest *request) override;
|
|
|
|
void handleRequest(AsyncWebServerRequest *request) override;
|
|
|
|
private:
|
|
bool isLocalIp(String name);
|
|
bool isLocalName(String name);
|
|
|
|
private:
|
|
char _local_name[32];
|
|
IPAddress _local_ip;
|
|
};
|