mirror of
https://github.com/boostorg/beast.git
synced 2025-07-02 15:30:58 +02:00
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:
17637a48cc
This commit is contained in:
committed by
Mohammad Nejati
parent
bd804b6520
commit
03b792faac
@ -16,14 +16,13 @@
|
||||
#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/strand.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/ssl.hpp>
|
||||
#include <boost/asio/strand.hpp>
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@ -49,8 +48,7 @@ fail(beast::error_code ec, char const* what)
|
||||
// Echoes back all received WebSocket messages
|
||||
class session : public std::enable_shared_from_this<session>
|
||||
{
|
||||
websocket::stream<
|
||||
beast::ssl_stream<beast::tcp_stream>> ws_;
|
||||
websocket::stream<ssl::stream<beast::tcp_stream>> ws_;
|
||||
beast::flat_buffer buffer_;
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user