ESP32 HTTPS Server

WebsocketNode.hpp
1 #ifndef SRC_WEBSOCKETNODE_HPP_
2 #define SRC_WEBSOCKETNODE_HPP_
3
4 #include <string>
5
6 #include "HTTPNode.hpp"
7 #include "WebsocketHandler.hpp"
8
9 namespace httpsserver {
10
11 typedef WebsocketHandler* (WebsocketHandlerCreator)();
12
13 class WebsocketNode : public HTTPNode {
14 public:
15 WebsocketNode(const std::string &path, const WebsocketHandlerCreator creatorFunction, const std::string &tag = "");
16 virtual ~WebsocketNode();
17 WebsocketHandler* newHandler();
18 std::string getMethod() { return std::string("GET"); }
19 private:
20 const WebsocketHandlerCreator * _creatorFunction;
21 };
22
23 } /* namespace httpsserver */
24
25 #endif /* SRC_WEBSOCKET_HPP_ */
httpsserver::HTTPNode
Base class for a URL/route-handler in the server.
Definition: HTTPNode.hpp:26
httpsserver::WebsocketNode
Definition: WebsocketNode.hpp:13
httpsserver::WebsocketHandler
Definition: WebsocketHandler.hpp:34
httpsserver
Definition: ConnectionContext.cpp:3