This commit is contained in:
Yuri Trikoz
2020-06-24 01:16:00 +03:00
parent b50911ddcf
commit e375cca3dc
16 changed files with 541 additions and 109 deletions

View File

@@ -0,0 +1,22 @@
#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;
};