summaryrefslogtreecommitdiffhomepage
path: root/plugins/websocket/websocket.h
blob: 27218da3e68f91119a90d1bb53adfa4cf3f51373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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;