Line data Source code
1 : #pragma once 2 : 3 : #include <websocketpp/config/asio_no_tls.hpp> 4 : #include <websocketpp/server.hpp> 5 : 6 : namespace Com { 7 0 : class WebSocketServer { 8 : websocketpp::server<websocketpp::config::asio> srv; 9 : 10 : void wsHandler(websocketpp::connection_hdl hdl); 11 : void wsHandlerThread(websocketpp::connection_hdl hdl); 12 : void wsStringStream(websocketpp::connection_hdl hdl); 13 : 14 : public: 15 : WebSocketServer(int port = 9001); 16 : void loop(); 17 : }; 18 : } // namespace Com