#ifndef _WEBSERVER_H #define _WEBSERVER_H #include #include #include #include class WebServer : public ESP8266WebServer { public: WebServer(int port) : ESP8266WebServer(port) { } bool matchesPattern(const String& pattern, const String& url); void onPattern(const String& pattern, const HTTPMethod method, PatternHandler::TPatternHandlerFn fn); inline bool clientConnected() { return _currentClient && _currentClient.connected(); } private: void resetPathMatches(); void checkPatterns(); }; #endif