summaryrefslogtreecommitdiffhomepage
path: root/plugins/websocket/websocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/websocket/websocket.h')
-rw-r--r--plugins/websocket/websocket.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/plugins/websocket/websocket.h b/plugins/websocket/websocket.h
new file mode 100644
index 0000000..27218da
--- /dev/null
+++ b/plugins/websocket/websocket.h
@@ -0,0 +1,29 @@
+#pragma once
+
+#include "../../plugin_interface.h"
+
+#include <boost/asio.hpp>
+
+#include <cstdint>
+#include <mutex>
+#include <set>
+
+class websocket_plugin: public webserver_plugin_interface
+{
+
+public:
+ websocket_plugin();
+ ~websocket_plugin();
+
+ std::string name() override;
+ std::string generate_page(
+ std::function<std::string(const std::string& key)>& GetServerParam,
+ std::function<std::string(const std::string& key)>& GetRequestParam, // request including body (POST...)
+ std::function<void(const std::string& key, const std::string& value)>& SetResponseHeader // to be added to result string
+ ) override;
+
+ bool has_own_authentication() override;
+};
+
+extern "C" BOOST_SYMBOL_EXPORT websocket_plugin webserver_plugin;
+websocket_plugin webserver_plugin;