diff --git a/toREST/include/ws.hpp b/toREST/include/ws.hpp index ada7b1f..3a5e724 100644 --- a/toREST/include/ws.hpp +++ b/toREST/include/ws.hpp @@ -6,17 +6,21 @@ namespace tr { namespace ws { + namespace status { const int normal = 1000; const int unexpected = 1011; -}; +} + template void on_error(Session &session, Connection con, const boost::system::error_code &ec) { std::cerr << ec.message() << std::endl; } + template void on_close(Session &session, Connection con, int status, const std::string &reason) { } + template void on_open(Server &server, Session &session, Connection con) { if (session.is_valid()) { @@ -25,6 +29,7 @@ void on_open(Server &server, Session &session, Connection con) { server.send_close(con, status::unexpected, "Session not valid"); } } + template void on_message(Session &session, Connection con, Message message) { }