From deb28a9ce73ed7e38aaa53659027b61976fdca6b Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Wed, 11 Jan 2023 18:36:43 +0100 Subject: Websocket for both http and https --- websocket.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'websocket.cpp') 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(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&& stream, std::string websocket_address, request_type&& req) +{ + std::make_shared(ioc, std::move(stream), std::move(websocket_address))->do_accept_in(std::move(req)); +} -- cgit v1.2.3