forked from boostorg/beast
ssl_stream does not use flat_stream
We no longer need to use flat_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:
committed by
Mohammad Nejati
parent
6dd3cf7ab1
commit
bd804b6520
@@ -210,7 +210,7 @@ fail(beast::error_code ec, char const* what)
|
||||
// Handles an HTTP server connection
|
||||
void
|
||||
do_session(
|
||||
tcp::socket socket,
|
||||
tcp::socket& socket,
|
||||
std::shared_ptr<std::string const> const& doc_root)
|
||||
{
|
||||
beast::error_code ec;
|
||||
@@ -287,10 +287,10 @@ int main(int argc, char* argv[])
|
||||
acceptor.accept(socket);
|
||||
|
||||
// Launch the session, transferring ownership of the socket
|
||||
std::thread{
|
||||
do_session,
|
||||
std::thread{std::bind(
|
||||
&do_session,
|
||||
std::move(socket),
|
||||
doc_root}.detach();
|
||||
doc_root)}.detach();
|
||||
}
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
|
||||
Reference in New Issue
Block a user