net::ssl::stream is canonical in examples

We no longer need to use beast::ssl_stream to improve write performance, as
Asio now linearizes scatter/gather I/O in ssl::stream:
https://github.com/chriskohlhoff/asio/commit/17637a48ccbfa2f63941d8393a7c8316a8df4a79
This commit is contained in:
Mohammad Nejati
2024-05-31 16:45:52 +03:30
committed by Mohammad Nejati
parent bd804b6520
commit 03b792faac
20 changed files with 63 additions and 90 deletions
@@ -16,11 +16,10 @@
#include "example/common/server_certificate.hpp"
#include <boost/beast/core.hpp>
#include <boost/beast/ssl.hpp>
#include <boost/beast/websocket.hpp>
#include <boost/beast/websocket/ssl.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ssl/stream.hpp>
#include <boost/asio/ssl.hpp>
#include <cstdlib>
#include <functional>
#include <iostream>
@@ -43,7 +42,7 @@ do_session(tcp::socket socket, ssl::context& ctx)
try
{
// Construct the websocket stream around the socket
websocket::stream<beast::ssl_stream<tcp::socket&>> ws{socket, ctx};
websocket::stream<ssl::stream<tcp::socket&>> ws{socket, ctx};
// Perform the SSL handshake
ws.next_layer().handshake(ssl::stream_base::server);