-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebsocket_handler.hpp
More file actions
36 lines (26 loc) · 931 Bytes
/
websocket_handler.hpp
File metadata and controls
36 lines (26 loc) · 931 Bytes
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
30
31
32
33
34
35
36
// Nonolith Connect
// https://github.com/nonolith/connect
// Websocketpp handler class
// Released under the terms of the GNU GPLv3+
// (C) 2012 Nonolith Labs, LLC
// Authors:
// Kevin Mehall <km@kevinmehall.net>
#include <boost/shared_ptr.hpp>
#include "websocketpp.hpp"
#include "websocket_connection_handler.hpp"
#include <map>
#include <string>
#include <vector>
class data_server_handler : public websocketpp::connection_handler {
public:
data_server_handler() {}
virtual ~data_server_handler() {}
void on_client_connect(websocketpp::session_ptr client);
void on_open(websocketpp::session_ptr client);
void on_close(websocketpp::session_ptr client);
void on_message(websocketpp::session_ptr client,const std::string &msg);
void on_message(websocketpp::session_ptr client,
const std::vector<unsigned char> &data);
private:
};
typedef boost::shared_ptr<data_server_handler> data_server_handler_ptr;