summaryrefslogtreecommitdiffhomepage
path: root/websocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'websocket.cpp')
-rw-r--r--websocket.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/websocket.cpp b/websocket.cpp
index a4c8dfb..37d4b59 100644
--- a/websocket.cpp
+++ b/websocket.cpp
@@ -1,2 +1,12 @@
#include "websocket.h"
+
+void make_websocket_session(boost::asio::io_context& ioc, beast::tcp_stream&& stream, std::string websocket_address, request_type&& req)
+{
+ std::make_shared<plain_websocket_session>(ioc, std::move(stream), std::move(websocket_address))->do_accept_in(std::move(req));
+}
+
+void make_websocket_session(boost::asio::io_context& ioc, beast::ssl_stream<beast::tcp_stream>&& stream, std::string websocket_address, request_type&& req)
+{
+ std::make_shared<ssl_websocket_session>(ioc, std::move(stream), std::move(websocket_address))->do_accept_in(std::move(req));
+}