forked from boostorg/beast
1 parent
22dcb4a3cb
commit
00e8c381cd
6 files changed
+11
-6
No files matched your search
@@ -55,7 +55,7 @@ do_session(
|
||||
|
||||
// These objects perform our I/O
|
||||
tcp::resolver resolver{ioc};
|
||||
websocket::stream<ssl::stream<
|
||||
websocket::stream<beast::ssl_stream<
|
||||
beast::tcp_stream<net::io_context::executor_type>>> ws(ioc, ctx);
|
||||
|
||||
// Look up the domain name
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <boost/beast/core.hpp>
|
||||
#include <boost/beast/websocket.hpp>
|
||||
#include <boost/beast/websocket/ssl.hpp>
|
||||
#include <boost/beast/_experimental/core/ssl_stream.hpp>
|
||||
#include <boost/asio/connect.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/ssl/stream.hpp>
|
||||
@@ -61,7 +62,7 @@ int main(int argc, char** argv)
|
||||
|
||||
// These objects perform our I/O
|
||||
tcp::resolver resolver{ioc};
|
||||
websocket::stream<ssl::stream<tcp::socket>> ws{ioc, ctx};
|
||||
websocket::stream<beast::ssl_stream<tcp::socket>> ws{ioc, ctx};
|
||||
|
||||
// Look up the domain name
|
||||
auto const results = resolver.resolve(host, port);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <boost/beast/core.hpp>
|
||||
#include <boost/beast/websocket.hpp>
|
||||
#include <boost/beast/websocket/ssl.hpp>
|
||||
#include <boost/beast/_experimental/core/ssl_stream.hpp>
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/ssl/stream.hpp>
|
||||
#include <cstdlib>
|
||||
@@ -42,7 +43,7 @@ do_session(tcp::socket& socket, ssl::context& ctx)
|
||||
try
|
||||
{
|
||||
// Construct the websocket stream around the socket
|
||||
websocket::stream<ssl::stream<tcp::socket&>> ws{socket, ctx};
|
||||
websocket::stream<beast::ssl_stream<tcp::socket&>> ws{socket, ctx};
|
||||
|
||||
// Perform the SSL handshake
|
||||
ws.next_layer().handshake(ssl::stream_base::server);
|
||||
|
||||
Reference in new issue
Block a user