mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
Terminal
This commit is contained in:
22
include/CaptiveRequestHandler.h
Normal file
22
include/CaptiveRequestHandler.h
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user